/*-----------------------------------*\
  #WISHLIST STYLES
\*-----------------------------------*/

/* Wishlist Hero Section */
.wishlist-hero {
  padding-block: 60px;
  padding-top: 140px;
  text-align: center;
  color: var(--white);
}

.wishlist-title {
  font-size: var(--fs-1);
  font-weight: var(--fw-700);
  margin-block-end: 10px;
}

.wishlist-subtitle {
  font-size: var(--fs-6);
  opacity: 0.9;
}

/* Wishlist Content Section */
.wishlist-content {
  padding-block: 60px;
}

/* Loading State */
.wishlist-loading-section {
  text-align: center;
  padding-block: 80px;
}

.wishlist-loading {
  max-width: 300px;
  margin-inline: auto;
}

.wishlist-loading .loading-bar {
  width: 100%;
  height: 4px;
  background-color: var(--platinum);
  border-radius: 2px;
  overflow: hidden;
  margin-block-end: 20px;
  position: relative;
}

.wishlist-loading .loading-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background-color: var(--portland-orange);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { left: -100%; }
  100% { left: 100%; }
}

.wishlist-loading p {
  color: var(--eerie-black);
  font-size: var(--fs-6);
}

/* Auth Required State */
.wishlist-auth-section {
  text-align: center;
  padding-block: 80px;
}

.wishlist-auth-container {
  max-width: 400px;
  margin-inline: auto;
}

.auth-message {
  background-color: var(--white);
  padding: 40px 30px;
  border-radius: 10px;
  box-shadow: var(--shadow-2);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.auth-icon {
  font-size: 48px;
  color: var(--portland-orange);
  margin-block-end: 20px;
}

.auth-message h2 {
  font-size: var(--fs-3);
  font-weight: var(--fw-700);
  margin-block-end: 10px;
  color: var(--eerie-black);
}

.auth-message p {
  font-size: var(--fs-6);
  color: var(--battleship-gray);
  margin-block-end: 30px;
}

/* Empty Wishlist State */
.wishlist-empty-section {
  text-align: center;
  padding-top: 20px;
  padding-bottom: 80px;
}

.wishlist-empty-container {
  max-width: 400px;
  margin-inline: auto;
}

.empty-message {
  background-color: var(--white);
  padding: 40px 30px;
  border-radius: 10px;
  box-shadow: var(--shadow-2);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.empty-icon {
  font-size: 48px;
  color: var(--portland-orange);
  margin-block-end: 20px;
}

.empty-message h2 {
  font-size: var(--fs-3);
  font-weight: var(--fw-700);
  margin-block-end: 10px;
  color: var(--eerie-black);
}

.empty-message p {
  font-size: var(--fs-6);
  color: var(--battleship-gray);
  margin-block-end: 30px;
}

.empty-message .btn {
  margin-inline: auto;
  display: inline-block;
}

/* Ensure empty state button stays white on hover */
/* Keep button default style; only prevent text color change on hover */
.wishlist-empty-section .empty-message .btn {
  border: none;
}

.wishlist-empty-section .empty-message .btn:hover,
.wishlist-empty-section .empty-message .btn:focus,
.wishlist-empty-section .empty-message .btn:active {
  color: white; /* do not turn green */
}

/* Wishlist Items Section */
.wishlist-items-section {
  max-width: 1200px;
  margin-inline: auto;
}

.wishlist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-block-end: 40px;
  padding-block-end: 20px;
  border-bottom: 1px solid var(--platinum);
}

.wishlist-header h2 {
  font-size: var(--fs-2);
  font-weight: var(--fw-700);
  color: var(--eerie-black);
}

/* Clear All button styling */
#clearWishlistBtn {
  background-color: var(--white);
  color: var(--theme-accent);
  border: 2px solid var(--theme-accent);
  border-radius: 8px;
}

#clearWishlistBtn:hover,
#clearWishlistBtn:focus {
  background-color: var(--theme-accent);
  color: var(--white);
}

/* Clear Wishlist Modal buttons */
#cancelClearWishlist {
  background-color: var(--white);
  color: var(--theme-accent);
  border: 2px solid var(--theme-accent);
  border-radius: 8px;
  transition: var(--transition-1);
}

#cancelClearWishlist:hover,
#cancelClearWishlist:focus {
  background-color: var(--theme-accent);
  color: var(--white);
}

/* Keep Clear All text white on hover in modal */
#confirmClearWishlist:hover,
#confirmClearWishlist:focus,
#confirmClearWishlist:active {
  color: var(--white) !important;
}

/* Wishlist Grid */
.wishlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

/* Wishlist Item */
.wishlist-item {
  background-color: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-2);
  transition: var(--transition-1);
}

.wishlist-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-3);
}

.wishlist-item-image {
  position: relative;
  height: 220px;
  overflow: hidden;
  background-color: #f7f7f7;
}

.wishlist-item-image img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* ensure full image visible */
  object-position: center;
  background-color: transparent;
  transition: none;
}

/* Reduce hover zoom effect since we use contain */
.wishlist-item:hover .wishlist-item-image img {
  transform: none;
}

.snackbar .snackbar-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.snackbar .snackbar-icon {
  flex-shrink: 0;
}

.snackbar .snackbar-text {
  flex: 1;
  min-width: 0;
}

.snackbar .snackbar-close {
  margin-left: auto;
  background: transparent;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.remove-wishlist-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: var(--white);
  color: var(--eerie-black);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-1);
  box-shadow: var(--shadow-1);
}

.remove-wishlist-btn:hover {
  background-color: var(--portland-orange);
  color: var(--white);
  transform: scale(1.1);
}

.remove-wishlist-btn ion-icon {
  font-size: 18px;
}

.wishlist-item-content {
  padding: 20px;
}

.wishlist-item-title {
  font-size: var(--fs-5);
  font-weight: var(--fw-700);
  color: var(--eerie-black);
  margin-block-end: 10px;
  line-height: 1.3;
}

.wishlist-item-price {
  font-size: var(--fs-6);
  font-weight: var(--fw-700);
  color: var(--portland-orange);
  margin-block-end: 20px;
}

.wishlist-item-actions {
  display: flex;
  gap: 10px;
}

.wishlist-item-actions .btn {
  flex: 1;
  padding: 10px 15px;
  font-size: var(--fs-7);
  text-align: center;
  text-decoration: none;
  border-radius: 5px;
  transition: var(--transition-1);
  cursor: pointer;
  border: none;
  font-weight: var(--fw-600);
}

.wishlist-item-actions .btn-outline {
  background-color: transparent;
  color: var(--theme-accent);
  border: 2px solid var(--theme-accent);
}

.wishlist-item-actions .btn-outline:hover {
  background-color: var(--theme-accent);
  color: var(--white);
}

.wishlist-item-actions .btn:not(.btn-outline) {
  background-color: var(--portland-orange);
  color: var(--white);
}

.wishlist-item-actions .btn:not(.btn-outline):hover {
  background-color: var(--theme-accent);
  transform: scale(1.05);
}

/* Snackbar styles are unified across site via style.css */

/* Responsive Design */
@media (max-width: 768px) {
  .wishlist-hero {
    padding-block: 40px;
    padding-top: 120px;
  }
  
  .wishlist-title {
    font-size: var(--fs-2);
  }
  
  .wishlist-content {
    padding-block: 40px;
  }
  
  .wishlist-header {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
  
  .wishlist-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .wishlist-item-actions {
    flex-direction: row; /* keep buttons side-by-side on mobile */
    flex-wrap: nowrap;
    gap: 10px;
  }
  
  /* Reorder buttons on mobile: Add to Cart on the right */
  .wishlist-item-actions .btn-outline {
    order: 1; /* View Details button */
  }
  
  .wishlist-item-actions .btn:not(.btn-outline) {
    order: 2; /* Add to Cart button */
  }
  
  /* Snackbar responsive styles are unified across site via style.css */
}

@media (max-width: 480px) {
  .wishlist-item-content {
    padding: 15px;
  }
  
  .wishlist-item-title {
    font-size: var(--fs-6);
  }
  
  .wishlist-item-price {
    font-size: var(--fs-7);
  }
  
  .wishlist-item-actions .btn {
    padding: 8px 12px;
    font-size: var(--fs-8);
  }
}

/* Modal styles for clear wishlist */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal.show { display: flex !important; }

.modal .modal-content {
  background: var(--white);
  border-radius: 12px;
  max-width: 420px;
  width: 90%;
  padding: 20px;
  box-shadow: var(--shadow-3);
  position: relative;
}

.modal .close-modal {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 24px;
  cursor: pointer;
}

.modal .modal-body h3 {
  margin: 0 0 10px;
  color: var(--eerie-black);
}

.modal .modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}
