
/* Wishlist Modal Styles — Production                              */
/* Matches design: 2-col card grid, image badge, heart btn,        */
/* pricing, swatches, stock, Add to Cart + delete, footer total   */
/* ================================================================ */

/* ================================================================ */
/* Modal Overlay & Container                                       */
/* ================================================================ */

.wishlist-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transform: translateY(-16px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.wishlist-modal.active {
  opacity: 1;
  transform: translateY(0);
}

.wishlist-modal__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  z-index: 99990;
}

.wishlist-modal__container {
  position: relative;
  z-index: 99999;
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  background: #fff;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

/* ================================================================ */
/* Modal Header                                                    */
/* ================================================================ */

.wishlist-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 28px 18px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.wishlist-modal__header-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wishlist-modal__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wishlist-modal__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111;
  margin: 0;
  line-height: 1.2;
}

.wishlist-modal__count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  background: #111;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
  line-height: 1;
}

.wishlist-modal__subtitle {
  font-size: 0.875rem;
  color: #9ca3af;
  margin: 4px 0 0;
}

.wishlist-modal__close {
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
  padding: 4px;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

.wishlist-modal__close:hover {
  background: #f3f4f6;
  color: #111;
}

/* ================================================================ */
/* Modal Body & Grid                                               */
/* ================================================================ */

.wishlist-modal__body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
  scrollbar-width: thin;
  scrollbar-color: #e5e7eb transparent;
}

.wishlist-modal__body::-webkit-scrollbar {
  width: 5px;
}

.wishlist-modal__body::-webkit-scrollbar-track {
  background: transparent;
}

.wishlist-modal__body::-webkit-scrollbar-thumb {
  background: #e5e7eb;
  border-radius: 4px;
}

.wishlist-grid {
  width: 100%;
}

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

@media (max-width: 600px) {
  .wishlist-items {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}




/* ================================================================ */
/* State Styles (Loading / Empty / Error)                          */
/* ================================================================ */

.wishlist-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center !important;
  text-align: center !important;
  padding: 60px 20px !important;
  grid-column: 1 / -1 !important;
}

.wishlist-state__icon-wrap {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 32px;
}

.wishlist-state--loading .wishlist-state__icon-wrap {
  display: none;
}

.wishlist-state__spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e5e7eb;
  border-top-color: var(--primary-color, #111);
  border-radius: 50%;
  animation: wl-spin 0.8s linear infinite;
  margin-bottom: 16px;
}

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

.wishlist-state--empty .wishlist-state__icon-wrap {
  color: #d1d5db;
}

.wishlist-state--error .wishlist-state__icon-wrap {
  background: #fef2f2;
  color: #ef4444;
}

.wishlist-state__message {
  font-size: 1rem;
  font-weight: 600;
  color: #374151;
  margin: 0 0 6px;
}

.wishlist-state__submessage {
  font-size: 0.875rem;
  color: #9ca3af;
  margin: 0 0 20px;
}

.wishlist-state__retry-btn {
  background: #111;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 28px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.wishlist-state__retry-btn:hover {
  background: #333;
}

/* ================================================================ */
/* Modal Footer                                                    */
/* ================================================================ */

.wishlist-modal__footer {
  border-top: 1px solid #f0f0f0;
  padding: 16px 28px 22px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wishlist-modal__footer-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wishlist-modal__footer-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wishlist-modal__footer-total-label {
  font-size: 0.85rem;
  color: #6b7280;
}

.wishlist-modal__footer-outofstock {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: #ef4444;
}

.wishlist-modal__footer-outofstock-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  flex-shrink: 0;
}

.wishlist-modal__footer-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: #111;
}

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

.wishlist-modal__move-all-btn {
  flex: 1;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 0.925rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.wishlist-modal__move-all-btn:hover {
  background: #333;
}

.wishlist-modal__move-all-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.wishlist-modal__continue-btn {
  height: 40px;
  padding: 0 22px;
  background: #fff;
  color: #374151;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  font-size: 0.925rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.wishlist-modal__continue-btn:hover {
  border-color: #111;
  background: #f9fafb;
}

/* ================================================================ */
/* Header Wishlist Trigger & Badge                                 */
/* ================================================================ */

.header-wishlist-trigger {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  padding: 0;
  line-height: 1;
  color: var(--header-text-color-primary-bg, var(--black-color));
  transition: opacity 0.2s ease;
}

.header-wishlist-trigger:hover {
  opacity: 0.7;
}

.wishlist-count-badge {
  position: absolute;
  top: -4px;
  right: -2px;
  background: #ef4444;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ================================================================ */
/* Responsive                                                      */
/* ================================================================ */

@media (max-width: 768px) {
  .wishlist-modal__container {
    max-width: 100%;
    max-height: 95vh;
    border-radius: 16px 16px 0 0;
    align-self: flex-end;
    margin: 0 0 0;
  }

  .wishlist-modal {
    align-items: flex-end;
    padding: 0;
  }

  .wishlist-modal__header,
  .wishlist-modal__body,
  .wishlist-modal__footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .wishlist-modal__footer-actions {
    flex-direction: column;
  }

  .wishlist-modal__continue-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .wishlist-product-card__cart-btn {
    font-size: 0.8rem;
    height: 38px;
  }

  .wishlist-product-card__delete-btn {
    height: 38px;
    width: 38px;
  }
}

/* ================================================================ */
/* Utility                                                         */
/* ================================================================ */

.d-none {
  display: none !important;
}

/* Remove animation */
.wishlist-product-card--removing {
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 0;
  transform: scale(0.95);
}