/* ============================================
   NUTRIVEDA ADVANCED E-COMMERCE FEATURES - STYLES
   ============================================ */

/* ============================================
   FEATURE 1: WISHLIST BUTTON & NOTIFICATION
   ============================================ */

.wishlist-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.wishlist-btn:hover {
  transform: scale(1.15);
  background: white;
  border-color: #e74c3c;
  box-shadow: 0 4px 16px rgba(231, 76, 60, 0.3);
}

.wishlist-btn .wishlist-icon {
  font-size: 24px;
  color: var(--forest);
  transition: all 0.3s ease;
  line-height: 1;
}

.wishlist-btn.active {
  background: #fff5f5;
  border-color: #e74c3c;
}

.wishlist-btn.active .wishlist-icon {
  color: #e74c3c;
}

.wishlist-btn.active:hover {
  background: #e74c3c;
}

.wishlist-btn.active:hover .wishlist-icon {
  color: white;
}

/* Pulse animation for wishlist add */
@keyframes wishlistPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.wishlist-btn.pulse {
  animation: wishlistPulse 0.6s ease;
}

.wishlist-btn.pulse .wishlist-icon {
  animation: heartBeat 0.6s ease;
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.3); }
  50% { transform: scale(1.1); }
  75% { transform: scale(1.2); }
}

/* Wishlist notification */
.wishlist-notification {
  position: fixed;
  top: 90px;
  right: 20px;
  background: white;
  color: var(--forest);
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 2px solid #e0e0e0;
  min-width: 250px;
}

.wishlist-notification.show {
  transform: translateX(0);
  opacity: 1;
}

.wishlist-notification.success {
  border-color: #4CAF50;
  background: #f1f8f4;
}

.wishlist-notification.info {
  border-color: #2196F3;
  background: #e3f2fd;
}

.wishlist-notification.warning {
  border-color: #FF9800;
  background: #fff3e0;
}

.wishlist-notification .notif-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  flex-shrink: 0;
}

.wishlist-notification.success .notif-icon {
  background: #4CAF50;
  color: white;
}

.wishlist-notification.info .notif-icon {
  background: #2196F3;
  color: white;
}

.wishlist-notification.warning .notif-icon {
  background: #FF9800;
  color: white;
}

.wishlist-notification .notif-message {
  flex: 1;
  font-size: 15px;
}

/* Wishlist count badge */
.wishlist-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #e74c3c;
  color: white;
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  padding: 0 6px;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* ============================================
   FEATURE 2: STICKY CART BAR
   ============================================ */

.sticky-cart-bar {
  position: fixed;
  bottom: -100px;
  left: 0;
  right: 0;
  background: white;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  z-index: 999;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-top: 3px solid var(--gold);
}

.sticky-cart-bar.visible.has-items {
  bottom: 0;
}

.sticky-cart-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
}

.sticky-cart-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sticky-cart-icon {
  font-size: 28px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.sticky-cart-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sticky-cart-items {
  font-size: 14px;
  color: var(--forest);
  font-weight: 600;
}

.sticky-cart-total {
  font-size: 20px;
  color: var(--gold);
  font-weight: 700;
  font-family: 'Playfair Display', serif;
}

.sticky-cart-btn {
  background: var(--forest);
  color: white;
  padding: 14px 32px;
  border-radius: 50px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
}

.sticky-cart-btn:hover {
  background: #2d5016;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ============================================
   FEATURE 3: QUICK VIEW MODAL
   ============================================ */

.quick-view-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.quick-view-modal.active {
  display: flex;
}

.quick-view-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease;
}

.quick-view-content {
  position: relative;
  background: white;
  border-radius: 20px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.quick-view-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--forest);
  font-size: 28px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--forest);
}

.quick-view-close:hover {
  background: var(--forest);
  color: white;
  transform: rotate(90deg);
}

.quick-view-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 40px;
}

.quick-view-image {
  position: relative;
}

.quick-view-image img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.wishlist-btn-quick {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: white;
  border: 2px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 26px;
}

.wishlist-btn-quick:hover {
  border-color: var(--gold);
  transform: scale(1.1);
}

.wishlist-btn-quick.active .wishlist-icon {
  color: #e74c3c;
}

.wishlist-btn-quick.active .wishlist-icon::before {
  content: '♥';
}

.quick-view-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.quick-view-badge {
  display: inline-block;
  background: var(--gold);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.quick-view-title {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  color: var(--forest);
  margin: 0;
  line-height: 1.3;
}

.quick-view-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.quick-view-rating .stars {
  color: var(--gold);
  font-size: 18px;
}

.quick-view-rating .review-count {
  color: #666;
}

.quick-view-price {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
}

.quick-view-current-price {
  font-size: 32px;
  font-weight: 700;
  color: var(--forest);
  font-family: 'Playfair Display', serif;
}

.quick-view-mrp {
  font-size: 18px;
  color: #999;
  text-decoration: line-through;
}

.quick-view-discount {
  background: #e74c3c;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

.quick-view-desc {
  color: #555;
  line-height: 1.6;
  margin: 8px 0;
}

.benefits-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.benefits-list li {
  padding: 8px 0;
  color: #444;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
}

.benefits-list li::before {
  content: '✓';
  color: #2ecc71;
  font-weight: bold;
  flex-shrink: 0;
}

.quick-view-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.quick-view-add-cart {
  flex: 1;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 50px;
}

.quick-view-full-details {
  padding: 16px 24px;
  text-decoration: none;
  text-align: center;
  border-radius: 50px;
  white-space: nowrap;
}

/* Quick View Button on Product Cards */
.quick-view-btn {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  background: var(--forest);
  color: white;
  padding: 10px 24px;
  border-radius: 50px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-size: 14px;
  z-index: 5;
}

.product-card:hover .quick-view-btn {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.quick-view-btn:hover {
  background: #2d5016;
}

/* ============================================
   FEATURE 4: SMART RECOMMENDATIONS
   ============================================ */

.recommendations-section {
  margin: 60px 0;
  padding: 40px 20px;
  background: var(--cream-light);
  border-radius: 20px;
}

.recommendations-title {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  color: var(--forest);
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.recommendations-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--gold);
}

.recommendations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.recommendation-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.recommendation-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.recommendation-image {
  position: relative;
  padding-top: 100%;
  overflow: hidden;
}

.recommendation-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.recommendation-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--gold);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.recommendation-info {
  padding: 20px;
}

.recommendation-info h4 {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  color: var(--forest);
  margin: 0 0 12px 0;
  line-height: 1.3;
  min-height: 48px;
}

.recommendation-price {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.recommendation-price .current {
  font-size: 24px;
  font-weight: 700;
  color: var(--forest);
  font-family: 'Playfair Display', serif;
}

.recommendation-price .mrp {
  font-size: 16px;
  color: #999;
  text-decoration: line-through;
}

.recommendation-price .discount {
  background: #e74c3c;
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.recommendation-add-btn {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  border-radius: 50px;
}

/* ============================================
   FEATURE 5: LIVE SEARCH
   ============================================ */

.live-search-container {
  position: sticky;
  top: 0;
  z-index: 900;
  background: white;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.live-search-wrapper {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.live-search-input {
  width: 100%;
  padding: 18px 50px 18px 24px;
  border: 2px solid #e0e0e0;
  border-radius: 50px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: #f9f9f9;
  font-family: 'DM Sans', sans-serif;
}

.live-search-input:focus {
  outline: none;
  border-color: var(--gold);
  background: white;
  box-shadow: 0 4px 20px rgba(200, 150, 12, 0.15);
}

.live-search-clear {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #e0e0e0;
  color: #666;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.live-search-clear:hover {
  background: var(--forest);
  color: white;
}

.live-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 8px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  max-height: 500px;
  overflow-y: auto;
  display: none;
  z-index: 1000;
}

.live-search-results.active {
  display: block;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
  transition: all 0.3s ease;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: var(--cream-light);
}

.search-result-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
}

.search-result-info {
  flex: 1;
}

.search-result-name {
  font-weight: 600;
  color: var(--forest);
  margin-bottom: 4px;
  font-size: 16px;
}

.search-result-name mark {
  background: var(--gold);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
}

.search-result-category {
  font-size: 13px;
  color: #999;
  margin-bottom: 4px;
}

.search-result-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
  font-family: 'Playfair Display', serif;
}

.search-no-results {
  padding: 40px;
  text-align: center;
  color: #999;
  font-size: 16px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  .quick-view-body {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px;
  }

  .quick-view-title {
    font-size: 22px;
  }

  .quick-view-current-price {
    font-size: 26px;
  }

  .sticky-cart-content {
    padding: 12px 16px;
  }

  .sticky-cart-icon {
    font-size: 24px;
  }

  .sticky-cart-total {
    font-size: 18px;
  }

  .sticky-cart-btn {
    padding: 12px 24px;
    font-size: 14px;
  }

  .recommendations-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
  }

  .recommendations-title {
    font-size: 22px;
  }

  .live-search-input {
    font-size: 14px;
    padding: 14px 45px 14px 20px;
  }

  .search-result-item {
    padding: 12px;
  }

  .search-result-item img {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 480px) {
  .quick-view-actions {
    flex-direction: column;
  }

  .quick-view-full-details {
    width: 100%;
  }

  .sticky-cart-text {
    display: none;
  }

  .sticky-cart-info {
    gap: 8px;
  }

  .recommendations-grid {
    grid-template-columns: 1fr;
  }
}
