/* 
 * Unique Modern E-commerce Design
 * Based on brand logo colors
 */

:root {
  /* Dark Theme (Default) */
  --bg-main: #020617;        /* slate-950 */
  --bg-card: #0f172a;        /* slate-900 */
  --text-main: #e2e8f0;      /* slate-200 */
  --text-muted: #94a3b8;    /* slate-400 */
  
  --accent-primary: #14b8a6; /* teal-500 */
  --accent-secondary: #06b6d4; /* cyan-500 */
  --accent-energy: #f59e0b;  /* amber-500 */
  --accent-eco: #10b981;     /* emerald-500 */
  
  /* Brand Colors - extracted from logo palette */
  --brand-primary: #2563eb;      /* Deep Blue */
  --brand-secondary: #3b82f6;    /* Bright Blue */
  --brand-accent: #60a5fa;       /* Light Blue */
  --brand-dark: #1e3a8a;         /* Dark Blue */
  --brand-light: #dbeafe;        /* Sky Blue */
  
  /* Neutral Colors */
  --neutral-50: #f8fafc;
  --neutral-100: #f1f5f9;
  --neutral-200: #e2e8f0;
  --neutral-300: #cbd5e1;
  --neutral-400: #94a3b8;
  --neutral-500: #64748b;
  --neutral-600: #475569;
  --neutral-700: #334155;
  --neutral-800: #1e293b;
  --neutral-900: #0f172a;
  --neutral-950: #020617;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--accent-secondary) 0%, var(--accent-primary) 100%);
  --gradient-accent: linear-gradient(135deg, var(--brand-secondary) 0%, var(--brand-accent) 100%);
  --gradient-dark: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-primary) 100%);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-brand: 0 10px 30px -5px rgba(37, 99, 235, 0.3);
  --shadow-brand-lg: 0 20px 40px -10px rgba(37, 99, 235, 0.4);
}

.theme-light {
  --bg-main: #ffffff;        /* white */
  --bg-card: #f8fafc;        /* slate-50 */
  --text-main: #1e293b;      /* slate-800 */
  --text-muted: #64748b;     /* slate-500 */
  
  --accent-primary: #06b6d4; /* cyan-500 */
  --accent-secondary: #10b981; /* emerald-500 */
  --accent-energy: #f59e0b;  /* amber-500 */
  --accent-eco: #10b981;     /* emerald-500 */
  
  /* Adjust shadows for light theme */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
  --shadow-brand: 0 10px 30px -5px rgba(6, 182, 212, 0.2);
  --shadow-brand-lg: 0 20px 40px -10px rgba(6, 182, 212, 0.25);
}

/* Modern Body Background */
body {
  background: var(--bg-main);
  color: var(--text-main);
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.theme-light {
  background-image: 
    radial-gradient(at 0% 0%, rgba(6, 182, 212, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.05) 0px, transparent 50%);
  background-attachment: fixed;
}

body:not(.theme-light) {
  background-image: 
    radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.1) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(59, 130, 246, 0.1) 0px, transparent 50%);
  background-attachment: fixed;
}

/* Hero Section Enhancements */
.hero-premium {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-premium::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.15) 0%, transparent 50%);
  animation: hero-glow 8s ease-in-out infinite alternate;
}

@keyframes hero-glow {
  0% {
    opacity: 0.3;
  }
  100% {
    opacity: 0.6;
  }
}

/* Modern Header */
.modern-header {
  background: var(--bg-card);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
  box-shadow: var(--shadow-lg);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.theme-light .modern-header {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(203, 213, 225, 0.3);
}

/* Mobile Menu Styles */
#mobile-menu {
  background: var(--bg-card);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
}

.theme-light #mobile-menu {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
}

.mobile-category-item {
  margin-bottom: 0.5rem;
}

.mobile-category-toggle {
  position: relative;
}

.mobile-category-toggle svg:last-child {
  transition: transform 0.3s ease;
}

.mobile-subcategories {
  max-height: 0;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease;
}

.mobile-subcategories:not(.hidden) {
  max-height: 500px;
  opacity: 1;
  margin-top: 0.5rem;
}

#mobile-menu-overlay {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Modern Product Card */
.product-card-premium {
  background: var(--bg-card);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 1.25rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.theme-light .product-card-premium {
  border: 1px solid rgba(203, 213, 225, 0.5);
  box-shadow: var(--shadow-md);
}

.product-card-premium::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}

.product-card-premium::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}

.product-card-premium:hover::before {
  opacity: 0.08;
}

.product-card-premium:hover::after {
  transform: scaleX(1);
}

.product-card-premium:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 20px 40px -10px rgba(37, 99, 235, 0.4),
              0 0 0 1px rgba(59, 130, 246, 0.2);
}

.product-card-premium > * {
  position: relative;
  z-index: 1;
}

/* Product Image Container */
.product-image-container {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-main) 100%);
  position: relative;
  overflow: hidden;
  border-radius: 1rem 1rem 0 0;
  transition: background 0.3s ease;
}

.product-image-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.product-image-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.product-card-premium:hover .product-image-container::before {
  opacity: 1;
}

.product-card-premium:hover .product-image-container::after {
  opacity: 0.15;
}

.product-image-container svg {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card-premium:hover .product-image-container svg {
  transform: scale(1.1);
  filter: drop-shadow(0 8px 16px rgba(59, 130, 246, 0.4));
}

/* Modern Button */
.btn-premium {
  background: var(--gradient-primary);
  color: white;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.theme-light .btn-premium {
  box-shadow: var(--shadow-lg);
}

.btn-premium::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-premium:hover::before {
  width: 300px;
  height: 300px;
}

.btn-premium:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-brand);
}

.btn-premium:active {
  transform: translateY(0);
}

/* Modern Link */
.link-premium {
  color: var(--accent-primary);
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.theme-light .link-premium {
  color: var(--accent-secondary);
}

.link-premium::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
}

.link-premium:hover {
  color: var(--accent-secondary);
  transform: translateX(4px);
}

.theme-light .link-premium:hover {
  color: var(--accent-primary);
}

.link-premium:hover::after {
  width: 100%;
}

.product-card-premium .link-premium {
  font-size: 0.875rem;
  font-weight: 600;
}

.link-premium:hover {
  color: var(--brand-secondary);
}

.link-premium:hover::after {
  width: 100%;
}

/* Modern Badge */
.badge-premium {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border: 1px solid rgba(59, 130, 246, 0.2);
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.badge-premium svg {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
}

.product-card-premium:hover .badge-premium {
  background: rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.4);
  transform: scale(1.05);
}

/* Modern Section Title */
.section-title-premium {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-subtitle-premium {
  color: var(--text-muted);
  font-size: 1.125rem;
  margin-bottom: 3rem;
}

/* How It Works Cards */
.how-it-works-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.how-it-works-card:hover {
  transform: translateY(-8px);
}

.how-it-works-card .glass-premium:hover {
  box-shadow: 0 20px 40px -10px rgba(37, 99, 235, 0.3),
              0 0 0 1px rgba(59, 130, 246, 0.2);
}

/* Filter Sidebar */
.filter-sidebar {
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
}

.filter-sidebar::-webkit-scrollbar {
  width: 6px;
}

.filter-sidebar::-webkit-scrollbar-track {
  background: rgba(30, 41, 59, 0.3);
  border-radius: 3px;
}

.filter-sidebar::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.3);
  border-radius: 3px;
}

.filter-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.5);
}

/* Modern Input */
.input-premium {
  background: var(--bg-card);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.theme-light .input-premium {
  background: var(--bg-card);
  border: 1px solid rgba(203, 213, 225, 0.3);
}

.input-premium:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
  background: var(--bg-card);
}

.theme-light .input-premium:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.input-premium::placeholder {
  color: var(--text-muted);
}

/* Modern Footer */
.modern-footer {
  background: linear-gradient(180deg, var(--neutral-900) 0%, var(--neutral-950) 100%);
  border-top: 1px solid rgba(59, 130, 246, 0.1);
}

.theme-light .modern-footer {
  background: linear-gradient(180deg, var(--neutral-800) 0%, var(--neutral-900) 100%);
  border-top: 1px solid rgba(203, 213, 225, 0.3);
}

/* Utility Classes for Theme Colors */
.text-main {
  color: var(--text-main);
}

.text-muted {
  color: var(--text-muted);
}

.bg-main {
  background-color: var(--bg-main);
}

.bg-card {
  background-color: var(--bg-card);
}

.text-accent-primary {
  color: var(--accent-primary);
}

.text-accent-secondary {
  color: var(--accent-secondary);
}

.bg-accent-primary {
  background-color: var(--accent-primary);
}

.bg-accent-secondary {
  background-color: var(--accent-secondary);
}

/* Glass Morphism Effect */
.glass-premium {
  background: var(--bg-card);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(59, 130, 246, 0.1);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.theme-light .glass-premium {
  border: 1px solid rgba(203, 213, 225, 0.3);
}

/* Gradient Text */
.text-gradient-premium {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Ensure gradient text is visible on both themes */
.theme-light .text-gradient-premium {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Fix for hover gradient text on light theme */
.theme-light h3.group-hover\:text-transparent.group-hover\:bg-clip-text,
.theme-light h3[class*="group-hover:text-transparent"][class*="group-hover:bg-clip-text"] {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Fix hover gradient text for product cards on light theme */
.theme-light .product-card-premium .group:hover h3.text-main,
.theme-light .category-card-premium .group:hover h3.text-main {
  color: var(--accent-primary) !important;
  background: none !important;
  -webkit-text-fill-color: var(--accent-primary) !important;
  background-clip: unset !important;
  -webkit-background-clip: unset !important;
}

/* Ensure gradient works on dark theme */
:not(.theme-light) .group:hover h3.text-main.group-hover\:text-transparent {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Hover Scale Effect */
.hover-scale-premium {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-scale-premium:hover {
  transform: scale(1.02);
}

/* Pulse Animation */
@keyframes pulse-premium {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.pulse-premium {
  animation: pulse-premium 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Shimmer Effect */
@keyframes shimmer-premium {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.shimmer-premium {
  background: linear-gradient(
    90deg,
    rgba(59, 130, 246, 0.1) 0%,
    rgba(59, 130, 246, 0.2) 50%,
    rgba(59, 130, 246, 0.1) 100%
  );
  background-size: 1000px 100%;
  animation: shimmer-premium 2s infinite;
}

/* Category Card Premium */
/* Category Card Premium */
.category-card-premium {
  background: var(--bg-card);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.category-card-premium::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 1rem;
  z-index: 0;
}

.category-card-premium > * {
  position: relative;
  z-index: 1;
}

.category-card-premium:hover::before {
  opacity: 0.05;
}

.category-card-premium:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(59, 130, 246, 0.2);
}

.theme-light .category-card-premium {
  border: 1px solid rgba(203, 213, 225, 0.3);
}

.theme-light .category-card-premium:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 10px 25px -5px rgba(6, 182, 212, 0.1);
}

/* Legal Content Styling */
.legal-content {
  color: var(--text-main);
}

.legal-content h2 {
  color: var(--text-main);
  font-size: 1.875rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.legal-content h3 {
  color: var(--text-main);
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.legal-content p {
  color: var(--text-main);
  margin-bottom: 1rem;
  line-height: 1.75;
}

.legal-content ul,
.legal-content ol {
  color: var(--text-main);
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.legal-content li {
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.legal-content a {
  color: var(--accent-primary);
  text-decoration: underline;
  transition: color 0.2s ease;
}

.legal-content a:hover {
  color: var(--accent-secondary);
}

/* Modern Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--neutral-900);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gradient-accent);
}


/* Loading Skeleton */
.skeleton-premium {
  background: linear-gradient(
    90deg,
    rgba(30, 41, 59, 0.5) 0%,
    rgba(59, 130, 246, 0.1) 50%,
    rgba(30, 41, 59, 0.5) 100%
  );
  background-size: 200px 100%;
  animation: shimmer-premium 1.5s infinite;
}

/* Responsive Typography */
@media (max-width: 768px) {
  .section-title-premium {
    font-size: 2rem;
  }
  
  .section-subtitle-premium {
    font-size: 1rem;
  }
}
