/* ===========================================
   Wishlist Page Styles - Verdanisse
   Saved items display and management
   =========================================== */

/* ===========================================
   Page Layout
   =========================================== */

.wishlist-page {
  padding: 2rem 1.5rem 4rem;
  min-height: 60vh;
}

.wishlist-page .container {
  max-width: 1200px;
  margin: 0 auto;
}

/* ===========================================
   Header Section
   =========================================== */

.wishlist-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
  flex-wrap: wrap;
}

.wishlist-header__title {
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
}

.wishlist-header__count {
  font-size: 0.9375rem;
  color: #6b7280;
  margin: 0;
}

.wishlist-header__count span {
  font-weight: 600;
  color: #374151;
}

/* ===========================================
   Empty Wishlist State
   =========================================== */

.wishlist-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  padding: 2rem;
}

.wishlist-empty__content {
  text-align: center;
  max-width: 400px;
}

.wishlist-empty__icon {
  width: 80px;
  height: 80px;
  color: #d1d5db;
  margin: 0 auto 1.5rem;
}

.wishlist-empty__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 0.75rem;
}

.wishlist-empty__text {
  color: #6b7280;
  line-height: 1.6;
  margin: 0 0 2rem;
}

/* ===========================================
   Wishlist Content
   =========================================== */

.wishlist-content {
  display: block;
}

/* Actions Bar */
.wishlist-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

/* ===========================================
   Wishlist Grid
   =========================================== */

.wishlist-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* ===========================================
   Wishlist Item Card
   =========================================== */

.wishlist-item {
  position: relative;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #f0f0f0;
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.wishlist-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* Remove Button */
.wishlist-item__remove {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: none;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  color: #9ca3af;
  transition: all 0.15s ease;
  z-index: 2;
}

.wishlist-item__remove:hover {
  background: #fee2e2;
  color: #ef4444;
}

.wishlist-item__remove svg {
  width: 16px;
  height: 16px;
}

/* Image */
.wishlist-item__image {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #f8f8f8;
  overflow: hidden;
}

.wishlist-item__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1rem;
  transition: transform 0.4s ease;
}

.wishlist-item:hover .wishlist-item__image img {
  transform: scale(1.05);
}

.wishlist-item__image a {
  display: block;
  width: 100%;
  height: 100%;
}

/* Badge */
.wishlist-item__badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.375rem 0.625rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-radius: 4px;
  background: #1a1a1a;
  color: #fff;
  z-index: 2;
}

/* Content */
.wishlist-item__content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.wishlist-item__brand {
  font-size: 0.7rem;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.wishlist-item__name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  line-height: 1.4;
  margin: 0;
  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: #1a1a1a;
}

/* Price */
.wishlist-item__price {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.wishlist-item__price-current {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
}

.wishlist-item__price-original {
  font-size: 0.8125rem;
  color: #9ca3af;
  text-decoration: line-through;
}

.wishlist-item__price-current:only-child {
  color: #333;
}

/* Stock Status */
.wishlist-item__stock {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  width: fit-content;
}

.wishlist-item__stock::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.wishlist-item__stock--in-stock {
  background: #d1fae5;
  color: #065f46;
}

.wishlist-item__stock--in-stock::before {
  background: #10b981;
}

.wishlist-item__stock--low-stock {
  background: #fef3c7;
  color: #92400e;
}

.wishlist-item__stock--low-stock::before {
  background: #c7642f;
}

.wishlist-item__stock--out-of-stock {
  background: #fee2e2;
  color: #991b1b;
}

.wishlist-item__stock--out-of-stock::before {
  background: #ef4444;
}

/* Add to Cart Button */
.wishlist-item__add-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  background: #1a1a1a;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.wishlist-item__add-btn:hover {
  background: #333;
}

.wishlist-item__add-btn:disabled {
  background: #d1d5db;
  cursor: not-allowed;
}

.wishlist-item__add-btn svg {
  width: 16px;
  height: 16px;
}

.wishlist-item__add-btn.added {
  background: #1a1a1a;
}

/* ===========================================
   Button Styles
   =========================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn--primary {
  background: #1a1a1a;
  color: #fff;
}

.btn--primary:hover {
  background: #333;
  transform: translateY(-1px);
}

.btn--outline {
  background: #fff;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.btn--outline:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.btn--text {
  background: transparent;
  color: #6b7280;
  padding: 0.5rem 1rem;
}

.btn--text:hover {
  color: #dc2626;
}

/* ===========================================
   Recently Viewed Section
   =========================================== */

.recently-viewed {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
}

.recently-viewed__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 1.5rem;
}

.recently-viewed__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
}

/* ===========================================
   Responsive Design
   =========================================== */

@media (max-width: 1200px) {
  .wishlist-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .recently-viewed__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .wishlist-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .recently-viewed__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .wishlist-page {
    padding: 1rem 1rem 3rem;
  }

  .wishlist-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .wishlist-header__title {
    font-size: 1.5rem;
  }

  .wishlist-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .wishlist-actions .btn {
    justify-content: center;
  }

  .recently-viewed__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .wishlist-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .wishlist-item__content {
    padding: 0.75rem;
  }

  .wishlist-item__name {
    font-size: 0.8125rem;
    -webkit-line-clamp: 1;
  }

  .wishlist-item__price-current {
    font-size: 0.9rem;
  }

  .wishlist-item__add-btn {
    padding: 0.625rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 400px) {
  .wishlist-empty__icon {
    width: 64px;
    height: 64px;
  }

  .wishlist-empty__title {
    font-size: 1.25rem;
  }
}
