/**
 * Wish Bolt - Frontend Styles
 */

/* Wishlist Button */
.wish-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 2px solid #e5e5e5;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.wish-btn:hover {
  border-color: #ec4899;
  background: #fdf2f8;
}

.wish-btn .wish-icon {
  font-size: 1.25rem;
  color: #9ca3af;
  transition: all 0.2s;
}

.wish-btn:hover .wish-icon {
  color: #ec4899;
}

.wish-btn.active {
  border-color: #ec4899;
  background: #ec4899;
}

.wish-btn.active .wish-icon {
  color: #fff;
}

.wish-btn.loading {
  pointer-events: none;
  opacity: 0.6;
}

/* Wishlist Button with text */
.wish-btn-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 2px solid #e5e5e5;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: #374151;
  transition: all 0.2s;
}

.wish-btn-text:hover {
  border-color: #ec4899;
  color: #ec4899;
}

.wish-btn-text.active {
  border-color: #ec4899;
  background: #fdf2f8;
  color: #ec4899;
}

.wish-btn-text .wish-icon {
  font-size: 1.1rem;
}

/* Wishlist Count Badge (header) */
.wish-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #ec4899;
  font-size: 0.9rem;
}

.wish-count-badge .count {
  background: #ec4899;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

/* Wishlist Page */
.wishlist-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 16px;
}

.wishlist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.wishlist-header h1 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.wishlist-header .count {
  color: #6b7280;
  font-weight: normal;
}

.wishlist-actions {
  display: flex;
  gap: 12px;
}

.wishlist-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: #f3f4f6;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.wishlist-share-btn:hover {
  background: #e5e7eb;
}

/* Wishlist Grid */
.wishlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

/* Wishlist Item Card */
.wishlist-item {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  transition: all 0.2s;
}

.wishlist-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.wishlist-item-image {
  position: relative;
  aspect-ratio: 1;
  background: #f9fafb;
}

.wishlist-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wishlist-item-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  background: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  opacity: 0;
  transition: opacity 0.2s;
}

.wishlist-item:hover .wishlist-item-remove {
  opacity: 1;
}

.wishlist-item-remove:hover {
  background: #fee2e2;
  color: #dc2626;
}

.wishlist-item-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #dc2626;
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.wishlist-item-badge.sale {
  background: #059669;
}

.wishlist-item-badge.low-stock {
  background: #d97706;
}

.wishlist-item-content {
  padding: 16px;
}

.wishlist-item-name {
  font-weight: 600;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wishlist-item-name a {
  color: inherit;
  text-decoration: none;
}

.wishlist-item-name a:hover {
  color: #ec4899;
}

.wishlist-item-price {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.wishlist-item-price .current {
  font-weight: 700;
  font-size: 1.1rem;
}

.wishlist-item-price .original {
  text-decoration: line-through;
  color: #9ca3af;
  font-size: 0.9rem;
}

.wishlist-item-price .savings {
  color: #059669;
  font-size: 0.8rem;
  font-weight: 600;
}

.wishlist-item-meta {
  font-size: 0.8rem;
  color: #6b7280;
  margin-bottom: 12px;
}

.wishlist-item-stock {
  font-size: 0.8rem;
  margin-bottom: 12px;
}

.wishlist-item-stock.in-stock {
  color: #059669;
}

.wishlist-item-stock.low-stock {
  color: #d97706;
}

.wishlist-item-stock.out-of-stock {
  color: #dc2626;
}

.wishlist-add-cart {
  width: 100%;
  padding: 12px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.wishlist-add-cart:hover {
  background: #333;
}

.wishlist-add-cart:disabled {
  background: #d1d5db;
  cursor: not-allowed;
}

.wishlist-add-cart.added {
  background: #059669;
}

/* Empty Wishlist */
.wishlist-empty {
  text-align: center;
  padding: 60px 20px;
}

.wishlist-empty .icon {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: 0.3;
}

.wishlist-empty h2 {
  margin: 0 0 8px;
  color: #374151;
}

.wishlist-empty p {
  color: #6b7280;
  margin: 0 0 24px;
}

.wishlist-empty .shop-btn {
  display: inline-block;
  padding: 12px 24px;
  background: #ec4899;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
}

/* Share Modal */
.wish-share-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.wish-share-modal.active {
  display: flex;
}

.wish-share-content {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  max-width: 400px;
  width: 100%;
}

.wish-share-content h3 {
  margin: 0 0 16px;
}

.wish-share-url {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.wish-share-url input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
}

.wish-share-url button {
  padding: 10px 16px;
  background: #ec4899;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.wish-share-socials {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.wish-share-socials a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  text-decoration: none;
  transition: background 0.15s;
}

.wish-share-socials a:hover {
  background: #e5e7eb;
}

/* Priority Indicator */
.wish-priority {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.wish-priority button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.3;
  transition: opacity 0.15s;
}

.wish-priority button:hover,
.wish-priority button.active {
  opacity: 1;
}

/* Toast Notifications */
.wish-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  z-index: 99999;
  animation: toastIn 0.3s ease;
}

.wish-toast.success {
  background: #059669;
}

.wish-toast.error {
  background: #dc2626;
}

@keyframes toastIn {
  from {
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

/* Mobile Styles */
@media (max-width: 600px) {
  .wishlist-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .wishlist-item-content {
    padding: 12px;
  }
  
  .wishlist-item-name {
    font-size: 0.9rem;
  }
  
  .wishlist-item-remove {
    opacity: 1;
  }
}
