/* Additional Component Styles for Modernization */

/* Search Bar */
.search-bar {
  flex: 1;
  max-width: 400px;
  margin: 0 2rem;
}

.search-form {
  display: flex;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  border: 2px solid var(--glass-border);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-input {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 16px;
  outline: none;
}

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

.search-btn {
  padding: 12px 16px;
  background: var(--gradient-primary);
  border: none;
  color: white;
  cursor: pointer;
  transition: var(--transition);
}

.search-btn:hover {
  background: var(--gradient-secondary);
  transform: scale(1.05);
}

/* Theme Toggle */
.theme-toggle {
  display: none; /* Disabled for now */
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 2px solid var(--glass-border);
  border-radius: var(--border-radius);
  padding: 10px;
  cursor: pointer;
  transition: var(--transition);
  margin-left: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.theme-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Trust Section */
.trust-section {
  padding: 60px 0;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  text-align: center;
}

.trust-item {
  padding: 30px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition);
}

.trust-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 10px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 1.1rem;
  color: var(--text-light);
  font-weight: 600;
}

/* Hero Animations */
.hero-title,
.hero-subtitle {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease-out forwards;
}

.hero-title {
  animation-delay: 0.2s;
}

.hero-subtitle {
  animation-delay: 0.4s;
}

.hero-cta {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease-out 0.6s forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-bounce {
  animation: bounceIn 1s ease-out 0.8s forwards;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    transform: scale(1);
  }
}

/* Particles */
.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) {
  width: 20px;
  height: 20px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.particle:nth-child(2) {
  width: 15px;
  height: 15px;
  top: 60%;
  left: 80%;
  animation-delay: 2s;
}

.particle:nth-child(3) {
  width: 25px;
  height: 25px;
  top: 40%;
  left: 60%;
  animation-delay: 4s;
}

.particle:nth-child(4) {
  width: 18px;
  height: 18px;
  top: 80%;
  left: 30%;
  animation-delay: 1s;
}

.particle:nth-child(5) {
  width: 22px;
  height: 22px;
  top: 10%;
  left: 70%;
  animation-delay: 3s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.7;
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
    opacity: 1;
  }
}

/* Enhanced Testimonials */
.testimonial-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin: 0 auto 15px;
  border: 3px solid var(--primary-color);
  overflow: hidden;
}

.testimonial-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial-rating {
  margin-top: 10px;
}

.star {
  width: 16px;
  height: 16px;
  color: #ffd700;
  fill: #ffd700;
}

/* Live Chat Widget */
.chat-widget {
  position: fixed;
  bottom: 120px;
  right: 20px;
  z-index: 1000;
}

.chat-toggle {
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(220, 20, 60, 0.3);
  transition: var(--transition);
  position: relative;
}

.chat-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(220, 20, 60, 0.4);
}

.chat-notification {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--error-color);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.chat-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 350px;
  max-width: 90vw;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.chat-header {
  background: var(--gradient-primary);
  color: white;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.chat-close {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
}

.chat-messages {
  max-height: 300px;
  overflow-y: auto;
  padding: 15px;
}

.message {
  margin-bottom: 15px;
  padding: 10px 15px;
  border-radius: var(--border-radius);
  max-width: 80%;
}

.message.bot {
  background: var(--secondary-color);
  margin-right: auto;
}

.message.user {
  background: var(--primary-color);
  color: white;
  margin-left: auto;
}

.chat-input {
  display: flex;
  padding: 15px;
  border-top: 1px solid var(--border-color);
  background: white;
}

.chat-input input {
  flex: 1;
  padding: 10px 15px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  outline: none;
  font-family: var(--font-body);
}

.chat-input button {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: var(--border-radius);
  cursor: pointer;
  margin-left: 10px;
  transition: var(--transition);
}

.chat-input button:hover {
  transform: scale(1.05);
}




/* Mobile Enhancements */
@media (max-width: 768px) {
  .search-bar {
    display: none; /* Hide search on mobile, show in menu */
  }

  .theme-toggle {
    margin-left: 0.5rem;
  }

  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .trust-item {
    padding: 20px;
  }

  .stat-number {
    font-size: 2rem;
  }

  .chat-window {
    width: 100%;
    max-width: none;
    right: -20px;
    bottom: 100px;
  }

  .particles {
    display: none; /* Disable particles on mobile for performance */
  }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  .particle,
  .hero-title,
  .hero-subtitle,
  .hero-cta,
  .animate-bounce {
    animation: none;
  }

  .btn::before {
    display: none;
  }
}

/* Focus States */
.search-input:focus,
.chat-input input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
}

.theme-toggle:focus,
.chat-toggle:focus,
.chat-close:focus,
.chat-input button:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Loading States */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Product Quick View Modal */
.quick-view-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.quick-view-content {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius-lg);
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.quick-view-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  z-index: 1;
}

/* Wishlist Styles */
.wishlist-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  z-index: 1;
}

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

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