/* ---------------------------
 * Wishlist buttons
 * --------------------------- */

/*
 * Base: .vp-btn-outline already layout/height/padding handle করে।
 * এখানে শুধু color + border + bg + small tweaks করছি।
 */

.vss-wishlist-toggle {
  cursor: pointer;
  border-radius: 999px;
  transition:
    border-color 0.16s ease-out,
    background-color 0.16s ease-out,
    color 0.16s ease-out,
    box-shadow 0.16s ease-out;
}

/* Hover: হালকা highlight, কিন্তু layout change না */
.vss-wishlist-toggle:hover {
  border-color: #f97316;
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.08);
}

/* Active / in wishlist state – first screenshot er moto */
.vss-wishlist-toggle.is-in-wishlist {
  border-color: #ef4444;
  background-color: #fff1f2;
  color: #ef4444;
}

/* Heart icon (loop button এর জন্য) */
.vss-wishlist-toggle .vp-wishlist-heart-icon::before {
  content: "♡";
  font-size: 14px;
  line-height: 1;
  display: inline-block;
  transform: translateY(0.5px);
  color: #9ca3af;
}

.vss-wishlist-toggle.is-in-wishlist .vp-wishlist-heart-icon::before {
  content: "♥";
  color: #ef4444;
}

/* Loading state */
.vss-wishlist-toggle.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Label spacing জাস্ট safe রাখতে */
.vss-wishlist-toggle .vp-btn-label {
  display: inline-block;
}

/* ---------------------------
 * Header wishlist bubble (small count)
 * --------------------------- */

.vss-header-wishlist-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.vss-header-wishlist-count {
  position: absolute;
  top: -6px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #fbbf24; /* 2nd screenshot er moto yellow */
  color: #111827;
  font-size: 10px;
  font-weight: 600;
  display: none; /* JS theke count > 0 hole flex hobe */
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ---------------------------
 * Wishlist page basic layout
 * --------------------------- */

.vss-wishlist-page .vss-wishlist-page-header {
  margin: 24px 0 12px;
}

.vss-wishlist-page .vss-wishlist-title {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 8px;
}

.vss-wishlist-empty {
  font-size: 14px;
  color: #6b7280;
  margin: 20px 0 40px;
}

/* -------------------------------------------------
 * MY WISHLIST – FULL PAGE DESIGN (._ws-x9__*)
 * ------------------------------------------------- */

/* Unique Wrapper CSS */
._ws-x9__wrapper {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #ffffff;
  color: #1f2937;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* Header Section */
._ws-x9__header-section {
  background-color: #0b1121;
  padding: 40px 20px;
  display: flex;
  justify-content: center;
  border-radius: 30px;
}

._ws-x9__header-container {
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

._ws-x9__header-texts {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

._ws-x9__title {
  color: #ffffff;
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  padding: 0;
}

._ws-x9__subtitle {
  color: #9ca3af;
  font-size: 14px;
  margin: 0;
  padding: 0;
}

._ws-x9__heart-icon {
  width: 32px;
  height: 32px;
  fill: #fbbf24;
}

/* Subheader Actions */
._ws-x9__actions-bar {
  width: 100%;
  max-width: 1200px;
  margin: 30px auto 20px auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
}

._ws-x9__item-count {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

._ws-x9__item-count strong {
  color: #111827;
}

/* Action Text */
._ws-x9__clear-action {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ef4444 !important;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  user-select: none;
  background: transparent;
  border: none;
}

._ws-x9__clear-icon {
  width: 16px;
  height: 16px;
  fill: #ef4444;
}

/* Grid Layout */
._ws-x9__product-grid {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 20px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  box-sizing: border-box;
  min-height: 800px; /* Pre-allocate space so footer doesn't jump */
  align-content: start;
}

/* Card Design */
._ws-x9__card {
  background: #ffffff;
  border: 1px solid #f3f4f6;
  border-radius: 12px;
  overflow: hidden;
  display: none; /* Hidden by default, JS will show them */
  flex-direction: column;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
  box-sizing: border-box;
  opacity: 0; /* For animation */
}

/* STRICT IMAGE CONTAINER */
._ws-x9__card-image-wrap {
  position: relative;
  width: 100%;
  height: 260px;
  overflow: hidden;
  background-color: #f9fafb;
  box-sizing: border-box;
}

._ws-x9__card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

._ws-x9__badge-top-left {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
  box-sizing: border-box;
  z-index: 2;
}

._ws-x9__badge--instock {
  background-color: #22c55e;
}
._ws-x9__badge--outstock {
  background-color: #ef4444;
}

._ws-x9__badge-bottom-left {
  position: absolute;
  bottom: 12px;
  left: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  background-color: #fbbf24;
  color: #111827;
  box-sizing: border-box;
  z-index: 2;
}

._ws-x9__close-action {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
  z-index: 2;
}

._ws-x9__close-icon {
  width: 14px;
  height: 14px;
  fill: #6b7280;
}

/* Card Content */
._ws-x9__card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  box-sizing: border-box;
}

._ws-x9__category {
  font-size: 11px;
  color: #fbbf24;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 6px 0;
}

._ws-x9__product-name {
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 10px 0;
  line-height: 1.3;
}

._ws-x9__product-name a {
  color: inherit;
  text-decoration: none;
}

._ws-x9__product-name a:hover {
  text-decoration: underline;
}

._ws-x9__rating-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
  box-sizing: border-box;
}

._ws-x9__star-icon {
  width: 14px;
  height: 14px;
  fill: #fbbf24;
}

._ws-x9__star-icon--empty {
  fill: none;
  stroke: #fbbf24;
  stroke-width: 2;
}

._ws-x9__rating-count {
  font-size: 12px;
  color: #6b7280;
  margin-left: 4px;
}

._ws-x9__price-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  box-sizing: border-box;
}

._ws-x9__current-price {
  font-size: 20px;
  font-weight: 800;
  color: #111827;
  margin: 0;
}

._ws-x9__old-price {
  font-size: 14px;
  color: #9ca3af;
  text-decoration: line-through;
  margin: 0;
}

/* Action Boxes */
._ws-x9__action-box {
  margin-top: auto;
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-sizing: border-box;
  transition: opacity 0.2s;
  user-select: none;
  text-decoration: none;
}

._ws-x9__action-box:hover {
  opacity: 0.9;
}

._ws-x9__trigger--add {
  background-color: #fbbf24 !important;
  color: #111827 !important;
}

._ws-x9__trigger--out {
  background-color: #e5e7eb !important;
  color: #9ca3af !important;
  cursor: not-allowed;
}

._ws-x9__cart-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* PAGINATION UI */
._ws-x9__pagination-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 60px;
  padding: 20px 0;
}

._ws-x9__page-node {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #4b5563;
  background-color: #f3f4f6;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}

._ws-x9__page-node:hover {
  background-color: #e5e7eb;
  color: #111827;
}

._ws-x9__page-node--active {
  background-color: #fbbf24;
  color: #111827;
  box-shadow: 0 4px 10px rgba(251, 191, 36, 0.3);
}

/* ANIMATION KEYFRAMES */
@keyframes _ws-x9__cardPopIn {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(15px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

._ws-x9__animate-in {
  animation: _ws-x9__cardPopIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Responsive */
@media (max-width: 992px) {
  ._ws-x9__product-grid {
    grid-template-columns: repeat(3, 1fr);
    min-height: 1000px;
  }
}
@media (max-width: 768px) {
  ._ws-x9__product-grid {
    grid-template-columns: repeat(2, 1fr);
    min-height: 1500px;
  }
  ._ws-x9__card-image-wrap {
    height: 220px;
  }
}
@media (max-width: 480px) {
  ._ws-x9__product-grid {
    grid-template-columns: repeat(1, 1fr);
    min-height: auto;
  }
  ._ws-x9__card-image-wrap {
    height: 280px;
  }
}

/* ---------------------------------------------
 * WISHLIST PAGE – Add to Cart → View Cart state
 * --------------------------------------------- */

/* Add to cart button jokhon .added hoy (AJAX success),
   tokhon button-ke black bg + white text kore dewa */
.vss-wishlist-page ._ws-x9__trigger--add.added {
  background-color: #000000 !important;
  color: #ffffff !important;
}

/* Wishlist page er niche default "View cart" link hide korbo */
.vss-wishlist-page .added_to_cart.wc-forward {
  display: none !important;
}