/* Wishlist App Styles */

/* Wishlist Button on Product Cards */
.wishlist-button {
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wishlist-button:hover {
  background: #fff;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wishlist-button.active .wishlist-icon {
  fill: #e74c3c;
  stroke: #e74c3c;
}

.wishlist-button .wishlist-icon {
  transition: all 0.2s ease;
}

/* Wishlist Icon in Header */
.header__icon--wishlist {
  position: relative;
}

.wishlist-count-bubble {
  position: absolute;
  top: -3px;
  right: -3px;
  background-color: rgb(var(--color-button));
  color: rgb(var(--color-button-text));
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Wishlist Page Container */
.wishlist-page-container {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 40px 20px;
}

.wishlist-page-container h1 {
  margin-bottom: 30px;
  font-size: 2.4rem;
  font-weight: 600;
}

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

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

.wishlist-empty p {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 20px;
}

.wishlist-empty a {
  display: inline-block;
  padding: 12px 24px;
  background: rgb(var(--color-button));
  color: rgb(var(--color-button-text));
  text-decoration: none;
  border-radius: 4px;
  transition: opacity 0.2s;
}

.wishlist-empty a:hover {
  opacity: 0.9;
}

/* Loading State */
.wishlist-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}

.wishlist-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid rgb(var(--color-button));
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Wishlist Controls */
.wishlist-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 15px;
}

.wishlist-sort select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
}

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

.wishlist-actions button {
  padding: 8px 16px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.wishlist-actions button:hover {
  background: #f5f5f5;
}

/* Share Link Modal */
.share-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.share-modal-content {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
}

.share-modal input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 15px;
}

/* Toast Notifications */
.wishlist-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #333;
  color: #fff;
  padding: 12px 24px;
  border-radius: 4px;
  z-index: 9999;
  animation: slideIn 0.3s ease;
}

.wishlist-toast.success {
  background: #27ae60;
}

.wishlist-toast.error {
  background: #e74c3c;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsive */
@media screen and (max-width: 749px) {
  .wishlist-button {
    width: 36px;
    height: 36px;
  }

  .wishlist-page-container {
    padding: 20px 15px;
  }

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