.container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 1rem;
}

.wishlistContainer {
  width: 100%;
  max-width: 1200px;
  background-color: #312e81; /* indigo-900 */
  border-radius: 0.5rem;
  padding: 1.5rem;
  color: white;
}

.title {
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 1.5rem;
}

.searchSection {
  margin-bottom: 1.5rem;
}

.searchBar {
  display: flex;
  margin-bottom: 1.25rem;
}

.searchInput {
  flex-grow: 1;
  padding: 0.5rem;
  border-radius: 0.5rem 0 0 0.5rem;
  background-color: #e0e7ff; /* indigo-100 */
  color: #1f2937; /* gray-800 */
  border: 0;
}

.searchButton {
  background-color: #e0e7ff; /* indigo-100 */
  border-radius: 0 0.5rem 0.5rem 0;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.searchIcon {
  height: 1.25rem;
  width: 1.25rem;
  color: #4b5563; /* gray-600 */
}

.filterSection {
  margin-bottom: 1.25rem;
}

.filterLabel {
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.filterButtons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.categoryButton,
.retailerButton {
  background-color: #e0e7ff; /* indigo-200 */
  color: #312e81; /* indigo-900 */
  border-radius: 0.5rem;
  padding: 0.25rem 1rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.selectedRetailer {
  background-color: #a5b4fc;
  font-weight: 700;
}

.itemsContainer {
  margin-top: 0.75rem;
}

.itemsLabel {
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
}

.itemsGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 0.5rem 0;
}

/* Responsive grid */
@media (max-width: 1200px) {
  .itemsGrid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .itemsGrid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.itemCard {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.05)
  );
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 1rem;
  padding: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(10px);
  min-height: 350px;
  position: relative;
}

.itemCard:hover {
  transform: translateY(-4px);
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: rgba(255, 255, 255, 0.25);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.15),
    rgba(255, 255, 255, 0.08)
  );
}

/* REDESIGNED IMAGE CONTAINER */
.itemImage {
  width: 100%;
  height: 140px;
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
  border-radius: 0.75rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.actualItemImage {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0.75rem;
}

.contributionOverlay {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  color: white;
  border-radius: 0.75rem;
  z-index: 10;
  backdrop-filter: blur(8px);
}

.itemCard:hover .contributionOverlay {
  opacity: 1;
  visibility: visible;
}

.contributionText {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.contributionProgress {
  width: 80%;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.contributionBar {
  height: 100%;
  background: linear-gradient(90deg, #a78bfa, #7c3aed, #6366f1);
  border-radius: 3px;
  transition: transform 0.6s ease;
  transform-origin: left;
  transform: scaleX(0);
}

.contributionAmount {
  font-size: 0.75rem;
  color: white;
  background-color: rgba(0, 0, 0, 0.2);
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-weight: 500;
}

.itemDetails {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.itemName {
  font-size: 0.9rem;
  font-weight: 600;
  color: #e0e7ff;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.5rem;
  border-radius: 0.5rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.itemDetailsEz {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.itemPrice {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  flex: 1;
  text-align: center;
  box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
}

.itemPriority {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  flex: 1;
  text-align: center;
  box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
}

.itemDescription {
  background: rgba(255, 255, 255, 0.08);
  color: #c7d2fe;
  padding: 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  line-height: 1.4;
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-height: 40px;
  align-items: center;
  text-align: center;
}

.itemNote {
  background: rgba(255, 255, 255, 0.08);
  color: #c7d2fe;
  padding: 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-style: italic;
}

.buttonsContainer {
  margin-top: auto;
}

.actionButtonsRow {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.contributionInputContainer {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.contributionInput {
  flex: 1;
  padding: 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 0.875rem;
}

.contributionInput::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.contributeSubmitButton,
.contributeCancelButton {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.contributeSubmitButton {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.contributeCancelButton {
  background: rgba(255, 255, 255, 0.1);
  color: #e0e7ff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.contributeSubmitButton:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-1px);
}

.contributeCancelButton:hover {
  background: rgba(255, 255, 255, 0.15);
}

.contributeButton,
.externalButton {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  text-align: center;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.contributeButton {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.externalButton {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.contributeButton:hover:not(:disabled) {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
}

.externalButton:hover:not(:disabled) {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.buttonPressed {
  background: linear-gradient(135deg, #a855f7, #9333ea);
  box-shadow: 0 2px 10px rgba(168, 85, 247, 0.4);
  transform: translateY(0px);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.buttonPressed:hover {
  background: linear-gradient(135deg, #9333ea, #7e22ce);
}

.contributeButton:disabled,
.externalButton:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(107, 114, 128, 0.5);
  box-shadow: none;
  transform: none;
}

.deleteButton {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(239, 68, 68, 0.9);
  border: none;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  z-index: 15;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
}

.deleteButton:hover {
  background: rgba(220, 38, 38, 1);
  transform: scale(1.1);
}

.loadingContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  width: 100%;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #c8abd6;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1200px) {
  .itemsGrid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .itemsGrid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .itemsGrid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .itemCard {
    min-height: 320px;
  }

  .itemImage {
    height: 120px;
  }
}
