/* Favorites Button Styling */
.favorite-button {
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 15px;
  border-radius: 4px;
  transition: all 0.3s ease;
  color: #666;
  background-color: #f0f0f0;
  margin-left: 10px;
}

.favorite-button:hover {
  background-color: #e0e0e0;
}

.favorite-button .favorite-icon {
  font-size: 18px;
  margin-right: 5px;
  transition: transform 0.3s ease;
}

.favorite-button:hover .favorite-icon {
  transform: scale(1.2);
}

.favorite-button.is-favorite {
  color: #e74c3c;
}

.favorite-button.is-favorite .favorite-icon {
  color: #e74c3c;
}

/* Favorites Count Badge */
.favorites-count {
  display: inline-block;
  background-color: #e74c3c;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  line-height: 20px;
  text-align: center;
  margin-left: 5px;
}

/* Favorites Page Styling */
.favorites-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.favorites-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.favorites-title {
  font-size: 24px;
  font-weight: 700;
}

.clear-favorites {
  background-color: #f0f0f0;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.clear-favorites:hover {
  background-color: #e0e0e0;
}

.no-favorites {
  text-align: center;
  padding: 40px;
  background-color: #f8f8f8;
  border-radius: 8px;
  margin: 20px 0;
}

.favorites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.favorite-item {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  background-color: white;
}

.favorite-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.favorite-item-image {
  height: 200px;
  overflow: hidden;
}

.favorite-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.favorite-item:hover .favorite-item-image img {
  transform: scale(1.05);
}

.favorite-item-content {
  padding: 15px;
}

.favorite-item-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 10px 0;
  line-height: 1.4;
  height: 44px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.favorite-item-price {
  font-size: 18px;
  font-weight: 700;
  color: #e74c3c;
  margin: 10px 0;
}

.favorite-item-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
}

.view-item {
  display: inline-block;
  padding: 8px 15px;
  background-color: #3a66c2;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s ease;
  text-align: center;
  flex: 1;
  margin-right: 10px;
}

.view-item:hover {
  background-color: #2a4e9e;
}

.remove-favorite {
  display: inline-block;
  padding: 8px 15px;
  background-color: #f0f0f0;
  color: #666;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.remove-favorite:hover {
  background-color: #e0e0e0;
  color: #e74c3c;
}

/* Notification */
#favorite-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 15px 20px;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  border-radius: 4px;
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
}

#favorite-notification.show {
  transform: translateY(0);
  opacity: 1;
}

#favorite-notification.added {
  background-color: rgba(46, 204, 113, 0.9);
}

#favorite-notification.removed {
  background-color: rgba(231, 76, 60, 0.9);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .favorites-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .favorites-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .favorites-grid {
    grid-template-columns: 1fr;
  }
}
