/* ===================================
   🛍️ MUNDIBAY E-COMMERCE DESIGN
   Professional & User-Friendly
   =================================== */

/* 🎯 E-Commerce Color Palette */
:root {
  /* Primary Brand Colors */
  --primary-50: #fef7ee;
  --primary-100: #fdedd3;
  --primary-200: #fbd7a5;
  --primary-300: #f8bc6d;
  --primary-400: #f59e42;
  --primary-500: #f2811d;
  --primary-600: #e36209;
  --primary-700: #bc4a09;
  --primary-800: #953a0f;
  --primary-900: #7a3010;
  
  /* Neutral Colors */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Success Colors */
  --success-50: #ecfdf5;
  --success-100: #d1fae5;
  --success-500: #10b981;
  --success-600: #059669;
  
  /* Warning Colors */
  --warning-50: #fffbeb;
  --warning-100: #fef3c7;
  --warning-500: #f59e0b;
  --warning-600: #d97706;
  
  /* Error Colors */
  --error-50: #fef2f2;
  --error-100: #fee2e2;
  --error-500: #ef4444;
  --error-600: #dc2626;
  
  /* Background Colors */
  --white: #ffffff;
  --background: #fafafa;
  --surface: #ffffff;
  --surface-hover: #f8f9fa;
  
  /* Text Colors */
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --text-white: #ffffff;
  
  /* Border Colors */
  --border-light: #e5e7eb;
  --border-medium: #d1d5db;
  --border-dark: #9ca3af;
  
  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --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);
  
  /* Animation Timings */
  --duration-150: 150ms;
  --duration-200: 200ms;
  --duration-300: 300ms;
  --duration-500: 500ms;
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* 🌟 Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

/* 🎠 Hero Slider */
.slider {
  position: relative;
  height: 60vh;
  min-height: 400px;
  max-height: 600px;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  margin-bottom: var(--space-12);
  background: var(--white);
}

.slides {
  display: flex;
  height: 100%;
  transition: transform var(--duration-500) cubic-bezier(0.4, 0, 0.2, 1);
}

.slide {
  min-width: 100%;
  position: relative;
  overflow: hidden;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-500) ease;
}

.slide:hover img {
  transform: scale(1.05);
}

/* Slider Navigation */
.nav {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 var(--space-6);
  transform: translateY(-50%);
  z-index: 10;
}

.nav button {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-200) ease;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav button:hover {
  background: var(--white);
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}

.nav button:active {
  transform: scale(0.95);
}

/* Slider Dots */
.dots {
  position: absolute;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--space-2);
  z-index: 10;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all var(--duration-200) ease;
}

.dot.active {
  background: var(--primary-500);
  transform: scale(1.2);
}

.dot:hover {
  background: rgba(255, 255, 255, 0.8);
}

/* 🔍 Search Results Header */
.search-results-header {
  text-align: center;
  padding: var(--space-8);
  margin-bottom: var(--space-8);
  background: var(--white);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.search-results-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

.result-count {
  display: block;
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-top: var(--space-2);
}

/* 🚫 No Results */
.no-results {
  text-align: center;
  padding: var(--space-16);
  background: var(--white);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.no-results-icon {
  font-size: 4rem;
  margin-bottom: var(--space-6);
  opacity: 0.6;
}

.no-results h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

.no-results p {
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
}

.search-suggestions {
  background: var(--gray-50);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin: var(--space-6) 0;
  text-align: left;
}

.search-suggestions h4 {
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  font-size: 1.1rem;
  font-weight: 600;
}

.search-suggestions ul {
  list-style: none;
}

.search-suggestions li {
  padding: var(--space-2) 0;
  color: var(--text-secondary);
  position: relative;
  padding-left: var(--space-6);
}

.search-suggestions li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary-500);
  font-weight: bold;
}

/* 🛍️ Products Grid - E-commerce Optimized */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-6);
  padding: 0 var(--space-4);
  max-width: 1200px;
  margin: 0 auto;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: all var(--duration-200) ease;
  box-shadow: var(--shadow-sm);
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-medium);
}

.product-image {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: var(--gray-50);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-300) ease;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

/* Stock Badge */
.stock-badge {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
}

.stock-badge.in-stock {
  background: var(--success-100);
  color: var(--success-600);
}

.stock-badge.low-stock {
  background: var(--warning-100);
  color: var(--warning-600);
}

.stock-badge.out-of-stock {
  background: var(--error-100);
  color: var(--error-600);
}

/* Product Info */
.product-info {
  padding: var(--space-5);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-category {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-2);
  font-weight: 500;
}

.product-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--space-3);
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.product-title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-200) ease;
}

.product-title a:hover {
  color: var(--primary-600);
}

.product-seller {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.seller-icon {
  font-size: 1rem;
  opacity: 0.7;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.stars {
  color: var(--warning-500);
  font-size: 1rem;
  line-height: 1;
}

.rating-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.tag {
  padding: var(--space-1) var(--space-2);
  background: var(--gray-100);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 500;
}

.product-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-600);
  margin-bottom: var(--space-4);
}

/* Product Actions */
.product-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: auto;
}

.btn {
  padding: var(--space-3) var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  cursor: pointer;
  transition: all var(--duration-200) ease;
  font-size: 0.875rem;
  line-height: 1;
}

.btn-primary {
  background: var(--primary-500);
  color: var(--text-white);
  flex: 1;
}

.btn-primary:hover {
  background: var(--primary-600);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--white);
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--border-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-disabled {
  background: var(--gray-100);
  color: var(--text-muted);
  cursor: not-allowed;
}

.btn-disabled:hover {
  transform: none;
  box-shadow: none;
}

/* 📱 Responsive Design */
@media (max-width: 768px) {
  .slider {
    height: 50vh;
    min-height: 300px;
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-8);
  }
  
  .search-results-header {
    padding: var(--space-6);
    margin-bottom: var(--space-6);
  }
  
  .search-results-header h2 {
    font-size: 1.5rem;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-4);
    padding: 0 var(--space-3);
  }
  
  .nav button {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  .no-results {
    padding: var(--space-12);
  }
  
  .no-results-icon {
    font-size: 3rem;
  }
  
  .no-results h3 {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
    padding: 0 var(--space-4);
  }
  
  .product-card {
    border-radius: var(--radius-lg);
  }
  
  .search-results-header {
    border-radius: var(--radius-xl);
    padding: var(--space-5);
  }
  
  .search-results-header h2 {
    font-size: 1.25rem;
  }
  
  .slider {
    border-radius: var(--radius-lg);
  }
  
  .product-actions {
    flex-direction: column;
  }
  
  .btn {
    padding: var(--space-3) var(--space-4);
  }
}

/* 🎨 Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp var(--duration-500) ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in {
  animation: slideIn var(--duration-300) ease-out;
}

/* 🎯 Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }

.bg-white { background-color: var(--white); }
.bg-gray-50 { background-color: var(--gray-50); }
.bg-gray-100 { background-color: var(--gray-100); }

.border { border: 1px solid var(--border-light); }
.border-0 { border: none; }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-full { border-radius: var(--radius-full); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.transition { transition: all var(--duration-200) ease; }

.hover-scale:hover { transform: scale(1.02); }
.hover-lift:hover { transform: translateY(-2px); }

/* 🛍️ E-commerce Specific */
.price-old {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 400;
  margin-right: var(--space-2);
}

.price-discount {
  background: var(--error-100);
  color: var(--error-600);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: var(--space-2);
}

.quick-view-btn {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: none;
  border-radius: var(--radius-full);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--duration-200) ease;
  opacity: 0;
  transform: scale(0.8);
}

.product-card:hover .quick-view-btn {
  opacity: 1;
  transform: scale(1);
}

.quick-view-btn:hover {
  background: var(--white);
  transform: scale(1.1);
}

.wishlist-btn {
  position: absolute;
  top: var(--space-3);
  left: calc(var(--space-3) + 44px);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: none;
  border-radius: var(--radius-full);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--duration-200) ease;
  opacity: 0;
  transform: scale(0.8);
  color: var(--text-secondary);
}

.product-card:hover .wishlist-btn {
  opacity: 1;
  transform: scale(1);
}

.wishlist-btn:hover {
  background: var(--white);
  transform: scale(1.1);
  color: var(--error-500);
}

.wishlist-btn.active {
  color: var(--error-500);
  background: var(--error-50);
}
