/* Wishlist drawer + product toggles */
.ps-wishlist-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-primary, #1c1b1f);
  border-radius: 999px;
  padding: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  text-decoration: none;
}

.ps-wishlist-button:hover {
  background: #f8fafc;
  color: var(--text-primary, #1c1b1f);
}

.ps-wishlist-badge {
  position: absolute;
  top: 4px;
  right: 2px;
  border-radius: 999px;
  background: var(--brand-primary, #13369d);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  line-height: 1;
}

.ps-wishlist-badge[hidden] {
  display: none !important;
}

.wishlist-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(2px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.wishlist-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(100vw, 410px);
  background: #ffffff;
  border-right: 1px solid #e3e8f2;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.15);
  z-index: 999;
  display: flex;
  flex-direction: column;
  transform: translateX(-102%);
  transition: transform 0.28s ease;
  font-family: "YekanBakhFaNum", sans-serif;
}

.wishlist-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.wishlist-drawer.is-open {
  transform: translateX(0);
}

body.wishlist-drawer-open {
  overflow: hidden;
}

.wishlist-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 18px;
  border-bottom: 1px solid #e3e8f2;
}

.wishlist-drawer-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.wishlist-drawer-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.wishlist-items-count {
  background: #dd2858;
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
}

.wishlist-close-button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.wishlist-close-button:hover {
  background: #f3f6fc;
  color: #1c1b1f;
}

.wishlist-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wishlist-empty-state {
  padding: 2rem 1rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.95rem;
}

.wishlist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid #e3e8f2;
  border-radius: 12px;
  background: #fff;
}

.wishlist-item__image {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wishlist-item__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.wishlist-item__body {
  flex: 1;
  min-width: 0;
}

.wishlist-item__title {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: #1c1b1f;
  text-decoration: none;
  line-height: 1.45;
  margin-bottom: 4px;
}

.wishlist-item__title:hover {
  color: #13369d;
}

.wishlist-item__price {
  font-size: 0.82rem;
  font-weight: 600;
  color: #13369d;
}

.wishlist-item__stock {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: #ba1a1a;
}

.wishlist-item__remove {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: #f3f6fc;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.wishlist-item__remove:hover {
  background: #fee2e2;
  color: #ba1a1a;
}

.wishlist-item__remove .material-symbols-outlined {
  font-size: 18px;
}

.wishlist-drawer-footer {
  padding: 14px 18px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #e3e8f2;
}

.wishlist-account-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  background: #13369d;
  color: #fff !important;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}

.wishlist-account-link:hover {
  background: #0f2d7a;
  color: #fff !important;
}

/* Product card toggle removed — wishlist only on single product sidebar */

.ps-wishlist-toast {
  position: fixed;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translate(-50%, 12px);
  z-index: 10030;
  background: #1e293b;
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: min(92vw, 360px);
  text-align: center;
}

.ps-wishlist-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 767px) {
  .ps-wishlist-button {
    padding: 6px;
  }
}

@media (min-width: 768px) {
  .ps-compare-button,
  .ps-wishlist-button,
  .ps-cart-button {
    padding: 8px;
  }
}
