:root {
  --wish-red: #ef1742;
  --wish-red-dark: #d90d34;
  --wish-ink: #171a28;
  --wish-muted: #737784;
  --wish-line: #e7e8ec;
  --wish-soft: #fff6f7;
}

.wishlist-page {
  background: #fff;
  color: var(--wish-ink);
  font-family: "Poppins", sans-serif;
}

.wishlist-page input,
.wishlist-page button,
.wishlist-page select,
.wishlist-page textarea {
  font-family: "Poppins", sans-serif;
}

.wishlist-page .desktop-header { position: relative; }
.wishlist-page .header-logo img { width: 175px; max-height: 46px; object-fit: contain; }

.wishlist-shell {
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 34px;
}

@keyframes wishlistFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes wishlistSlideIn {
  from { opacity: 0; transform: translateX(22px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes wishlistCountPop {
  0% { opacity: 0; transform: scale(.55); }
  70% { transform: scale(1.12); }
  100% { opacity: 1; transform: scale(1); }
}

.wishlist-titlebar > div:first-child {
  animation: wishlistFadeUp .55s cubic-bezier(.16, 1, .3, 1) backwards;
}

.wishlist-bulk-actions {
  animation: wishlistSlideIn .55s .08s cubic-bezier(.16, 1, .3, 1) backwards;
}

.wish-count {
  animation: wishlistCountPop .5s .18s cubic-bezier(.16, 1, .3, 1) backwards;
}

.animate-fade-up,
.wish-card-animate {
  animation: wishlistFadeUp .58s cubic-bezier(.16, 1, .3, 1) backwards;
}

.wish-animate {
  animation: wishlistFadeUp .6s .32s cubic-bezier(.16, 1, .3, 1) backwards;
}

.wishlist-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}

.wishlist-titlebar h1 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: #303542;
  font-size: 26px;
  line-height: 1.25;
  font-weight: 600;
}

.wish-count {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--wish-red);
  color: white;
  font-size: 14px;
  box-shadow: 0 5px 14px rgba(239, 23, 66, .23);
}

.wishlist-titlebar p {
  margin: 6px 0 0;
  color: var(--wish-muted);
  font-size: 13px;
}

.wishlist-titlebar p span { padding: 0 3px; }

.wishlist-bulk-actions { display: flex; align-items: center; gap: 14px; }

.select-all-control,
.bulk-btn {
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #d9dbe2;
  border-radius: 6px;
  background: #fff;
  color: #272a36;
  padding: 0 18px;
  font: 600 12px "Poppins", sans-serif;
  cursor: pointer;
  box-shadow: 0 2px 7px rgba(20, 26, 44, .05);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}

.select-all-control:hover,
.bulk-btn:hover { border-color: #aeb1ba; box-shadow: 0 4px 12px rgba(20, 26, 44, .09); }
.bulk-btn:active { transform: translateY(1px); }
.bulk-btn i { color: var(--wish-red); font-size: 14px; }
.bulk-btn-danger { border-color: var(--wish-red); background: var(--wish-red); color: #fff; }
.bulk-btn-danger i { color: #fff; }
.bulk-btn-danger:hover { background: var(--wish-red-dark); border-color: var(--wish-red-dark); }
.bulk-btn:disabled { cursor: wait; opacity: .65; }

.select-all-control input,
.card-select input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--wish-red);
  cursor: pointer;
}

.wishlist-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-bottom: 26px;
}

.wishlist-card {
  position: relative;
  overflow: visible;
  border: 1px solid var(--wish-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(29, 34, 52, .08);
  transition: transform .22s ease, box-shadow .22s ease, opacity .22s ease;
}

.wishlist-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(29, 34, 52, .12); }
.wishlist-card.is-removing { opacity: 0; transform: scale(.97); pointer-events: none; }

.card-select { position: absolute; top: 19px; left: -25px; z-index: 3; line-height: 1; }

.remove-wishlist-btn {
  position: absolute;
  z-index: 4;
  top: 18px;
  right: 18px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid #e1e3e8;
  border-radius: 7px;
  background: rgba(255, 255, 255, .96);
  color: #242936;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(20, 25, 40, .08);
  transition: color .2s, border-color .2s, transform .2s;
}

.remove-wishlist-btn:hover { color: var(--wish-red); border-color: #ffc5d0; transform: scale(1.04); }

.wishlist-image-wrap {
  position: relative;
  height: 176px;
  margin: 26px 18px 0;
  overflow: hidden;
  border-radius: 10px;
  background: #eaf1f8;
}

.wishlist-image-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.wishlist-card:hover .wishlist-image-wrap img { transform: scale(1.025); }

.product-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  border-radius: 5px;
  padding: 5px 10px;
  color: #fff;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  text-transform: uppercase;
}

.best-badge { left: 12px; background: #08ad60; }
.discount-badge { left: 12px; background: #ff6276; }
.best-badge + .discount-badge { left: auto; right: 12px; }

.wishlist-card-body { padding: 15px 18px 17px; }
.product-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.product-heading-row h2 {
  min-width: 0;
  overflow: hidden;
  margin: 0;
  color: #151720;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-state { flex: 0 0 auto; color: #11994e; font-size: 10px; font-weight: 500; }
.stock-state i { margin-right: 4px; font-size: 7px; }

.rating-row { display: flex; align-items: center; gap: 7px; margin-top: 3px; color: #858995; font-size: 11px; }
.stars { color: #ff9c00; font-size: 14px; letter-spacing: 1px; }

.price-row { display: flex; align-items: center; gap: 10px; min-height: 32px; margin-top: 3px; }
.price-row strong { color: #eb123c; font-size: 19px; }
.price-row del { color: #868995; font-size: 12px; }
.price-row span { border-radius: 15px; background: #fff0f3; color: var(--wish-red); padding: 4px 9px; font-size: 10px; font-weight: 600; }

.card-actions { display: grid; gap: 7px; margin-top: 7px; }
.card-btn {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #d8dae0;
  border-radius: 5px;
  font: 600 12px "Poppins", sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}

.card-btn-cart { border-color: var(--wish-red); background: var(--wish-red); color: #fff; }
.card-btn-cart:hover { border-color: var(--wish-red-dark); background: var(--wish-red-dark); }
.card-btn-cart.in-cart { border-color: #252a35; background: #252a35; }
.card-btn:disabled { cursor: wait; opacity: .65; }
.card-btn-view { background: #fff; color: #252a35; }
.card-btn-view:hover { border-color: #9da1ab; background: #f8f8fa; }

.move-to-cart {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 13px;
  border: 0;
  background: transparent;
  color: #ef3a59;
  padding: 0;
  font: 500 10px "Poppins", sans-serif;
  cursor: pointer;
}
.move-to-cart:hover { color: var(--wish-red-dark); }

/* Compact dynamic wishlist row, matching the cart item presentation. */
.wishlist-card {
  min-height: 148px;
  display: flex;
  align-items: center;
  overflow: visible;
  padding: 18px 18px 18px 30px;
}

.wishlist-card .card-select {
  top: 15px;
  left: 10px;
}

.wishlist-card .wishlist-image-wrap {
  flex: 0 0 128px;
  width: 128px;
  height: 108px;
  margin: 0 16px 0 0;
  border-radius: 9px;
}

.wishlist-card .wishlist-card-body {
  min-width: 0;
  flex: 1;
  padding: 0;
}

.wishlist-card .product-heading-row {
  align-items: flex-start;
}

.wishlist-card .product-heading-row h2 {
  padding-right: 8px;
  font-size: 15px;
  white-space: normal;
}

.wishlist-price-col {
  flex: 0 0 auto;
  text-align: right;
}

.wishlist-price-col strong {
  display: block;
  color: var(--wish-red);
  font-size: 16px;
  line-height: 1.3;
}

.wishlist-price-col div {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 2px;
}

.wishlist-price-col del {
  color: #9296a1;
  font-size: 9px;
}

.wishlist-price-col span {
  border-radius: 10px;
  background: #fff0f3;
  color: var(--wish-red);
  padding: 2px 5px;
  font-size: 8px;
  font-weight: 600;
}

.wishlist-card .rating-row {
  margin-top: 5px;
  gap: 6px;
  font-size: 10px;
}

.stars-outer {
  position: relative;
  display: inline-flex;
  font-size: 10px;
}

.stars-empty,
.stars-filled {
  display: flex;
  gap: 1px;
}

.stars-empty { color: #e2e8f0; }

.stars-filled {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  color: #f59e0b;
  white-space: nowrap;
}

.wishlist-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: #7c818d;
  font-size: 10px;
}

.wishlist-item-meta .product-category {
  color: #50545f;
  font-weight: 500;
}

.wishlist-card .card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 10px;
}

.wishlist-card .card-btn,
.wishlist-card .remove-wishlist-btn {
  position: static;
  width: auto;
  height: auto;
  min-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #555b67;
  padding: 0;
  font: 500 10px "Poppins", sans-serif;
  white-space: nowrap;
}

.wishlist-card .card-btn-cart,
.wishlist-card .card-btn-cart.in-cart {
  background: transparent;
  color: var(--wish-red);
}

.wishlist-card .card-btn:hover,
.wishlist-card .remove-wishlist-btn:hover {
  border: 0;
  background: transparent;
  color: var(--wish-red-dark);
  transform: none;
}

.wishlist-card .action-divider {
  color: #d3d5da;
  font-size: 10px;
}

.wishlist-benefits {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 22px 0 24px;
  border: 1px solid #f1dfe3;
  border-radius: 11px;
  background: linear-gradient(100deg, #fffafa, #fff 45%, #fff9fa);
  padding: 17px 38px;
  box-shadow: 0 5px 15px rgba(45, 30, 35, .04);
}

.wishlist-benefits > div { display: flex; align-items: center; gap: 13px; }
.wishlist-benefits > div { animation: wishlistFadeUp .45s cubic-bezier(.16, 1, .3, 1) backwards; }
.wishlist-benefits > div:nth-child(1) { animation-delay: .4s; }
.wishlist-benefits > div:nth-child(2) { animation-delay: .47s; }
.wishlist-benefits > div:nth-child(3) { animation-delay: .54s; }
.wishlist-benefits > div:nth-child(4) { animation-delay: .61s; }
.wishlist-benefits > div > span { flex: 0 0 45px; display: grid; width: 45px; height: 45px; place-items: center; border-radius: 50%; background: #ffecef; color: var(--wish-red); font-size: 19px; }
.wishlist-benefits p { margin: 0; color: #585c67; font-size: 10px; line-height: 1.45; }
.wishlist-benefits strong { display: block; color: #20232c; font-size: 12px; }

.recommendations { margin-top: 18px; }
.recommendations-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.recommendations-heading h2 { margin: 0; color: #1d202b; font-size: 18px; }
.recommendations-heading a { color: var(--wish-red); font-size: 11px; font-weight: 500; text-decoration: none; }
.recommendations-heading a i { margin-left: 5px; }

.recommendation-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.recommendation-card {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  min-height: 94px;
  overflow: hidden;
  border: 1px solid var(--wish-line);
  border-radius: 9px;
  background: #fff;
  padding: 6px 30px 6px 6px;
  transition: transform .2s, box-shadow .2s;
}
.recommendation-card:hover { transform: translateY(-2px); box-shadow: 0 7px 18px rgba(26, 31, 48, .08); }
.recommendation-image { display: block; height: 82px; overflow: hidden; border-radius: 7px; background: #edf1f5; }
.recommendation-image img { width: 100%; height: 100%; object-fit: cover; }
.recommendation-card h3 { overflow: hidden; margin: 0; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.recommendation-card h3 a { color: #1d202b; text-decoration: none; }
.mini-rating { margin: 4px 0 6px; color: #878b96; font-size: 9px; }
.mini-rating span { color: #ff9d00; letter-spacing: 1px; }
.mini-price { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 10px; }
.mini-price strong { color: #222631; font-size: 13px; }
.mini-price del { color: #989ba4; }
.mini-price em { border-radius: 10px; background: #fff0f3; color: var(--wish-red); padding: 3px 6px; font-size: 8px; font-style: normal; font-weight: 600; }
.recommend-heart { position: absolute; top: 10px; right: 10px; border: 0; background: transparent; color: #39404d; padding: 0; font-size: 14px; cursor: pointer; }
.recommend-heart:hover { color: var(--wish-red); }
.recommend-heart.is-saved { color: var(--wish-red); }
.recommend-heart:disabled { cursor: wait; opacity: .7; }

.wishlist-empty { margin: 30px 0 50px; border: 1px solid var(--wish-line); border-radius: 14px; background: linear-gradient(145deg, #fff, #fff8f9); padding: 58px 20px; text-align: center; }
.wishlist-empty.is-hidden { display: none; }
.empty-heart { display: grid; width: 74px; height: 74px; place-items: center; margin: 0 auto 17px; border-radius: 50%; background: #ffecef; color: var(--wish-red); font-size: 30px; }
.wishlist-empty h2 { margin: 0; font-size: 22px; }
.wishlist-empty p { margin: 8px 0 22px; color: var(--wish-muted); font-size: 13px; }
.empty-shop-btn { display: inline-flex; border-radius: 6px; background: var(--wish-red); color: #fff; padding: 11px 21px; font-size: 12px; font-weight: 600; text-decoration: none; }

#toast-container { position: fixed; z-index: 9999; top: 86px; right: 22px; display: grid; gap: 8px; }
.toast { transform: translateX(15px); border-radius: 7px; background: #20242e; color: #fff; padding: 11px 17px; opacity: 0; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); font: 500 12px "Poppins", sans-serif; transition: opacity .2s, transform .2s; }
.toast.show { transform: translateX(0); opacity: 1; }
.toast.error { background: var(--wish-red-dark); }

.wishlist-page footer .footer-nav .container { grid-template-columns: repeat(4, 1fr); }
.wishlist-page footer .footer-nav-list:last-child { display: none; }

@media (min-width: 1024px) and (max-width: 1280px) {
  .wishlist-shell { width: min(1160px, calc(100% - 64px)); }
  .wishlist-benefits { padding-inline: 24px; gap: 14px; }
  .recommendation-card { grid-template-columns: 82px minmax(0, 1fr); }
  .wishlist-card { padding-right: 14px; }
  .wishlist-card .wishlist-image-wrap { flex-basis: 112px; width: 112px; }
  .wishlist-card .card-actions { column-gap: 10px; row-gap: 7px; }
  .wishlist-card .action-divider { display: none; }
}

@media (max-width: 1023px) {
  .wishlist-shell { width: min(920px, calc(100% - 32px)); padding-top: 20px; }
  .wishlist-titlebar { align-items: flex-start; flex-direction: column; }
  .wishlist-bulk-actions { width: 100%; }
  .wishlist-bulk-actions > * { flex: 1; }
  .wishlist-grid { width: 100%; }
  .card-select { top: 12px; left: 12px; padding: 6px; border-radius: 5px; background: rgba(255, 255, 255, .92); }
  .wishlist-benefits { grid-template-columns: repeat(2, 1fr); }
  .recommendation-grid { grid-template-columns: repeat(2, 1fr); }
  .wishlist-card .action-divider { display: none; }
}

@media (min-width: 641px) and (max-width: 899px) {
  .wishlist-grid { grid-template-columns: 1fr; }
  .wishlist-card {
    min-height: 156px;
    padding: 20px 24px 20px 38px;
  }
  .wishlist-card .wishlist-image-wrap {
    flex-basis: 145px;
    width: 145px;
    height: 116px;
    margin-right: 22px;
  }
  .wishlist-card .product-heading-row h2 { font-size: 16px; }
  .wishlist-price-col strong { font-size: 17px; }
  .wishlist-card .card-actions { gap: 16px; }
}

@media (max-width: 640px) {
  .wishlist-shell { width: calc(100% - 24px); padding-top: 18px; }
  .wishlist-titlebar { gap: 18px; margin-bottom: 20px; }
  .wishlist-titlebar h1 { font-size: 23px; }
  .wish-count { width: 30px; height: 30px; }
  .wishlist-bulk-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .select-all-control { grid-column: 1 / -1; }
  .bulk-btn { height: auto; min-height: 42px; padding: 8px 10px; }
  .wishlist-grid { grid-template-columns: 1fr; gap: 18px; }
  .wishlist-image-wrap { height: 180px; margin: 14px 12px 0; }
  .wishlist-card-body { padding: 13px 13px 15px; }
  .remove-wishlist-btn { top: 22px; right: 20px; }
  .wishlist-benefits { grid-template-columns: 1fr; margin-top: 18px; padding: 18px; }
  .recommendation-grid { grid-template-columns: 1fr; }
  .recommendation-card { grid-template-columns: 100px minmax(0, 1fr); }
  #toast-container { top: 72px; right: 12px; left: 12px; }
  .toast { text-align: center; }
  .wishlist-page footer .footer-nav .container { grid-template-columns: 1fr 1fr !important; }
}

@media (max-width: 380px) {
  .wishlist-bulk-actions { grid-template-columns: 1fr; }
  .select-all-control { grid-column: auto; }
  .product-heading-row { align-items: flex-start; }
  .stock-state { margin-top: 3px; }
  .wishlist-page footer .footer-nav .container { grid-template-columns: 1fr !important; }
}

@media (max-width: 640px) {
  .wishlist-card {
    min-height: 126px;
    align-items: flex-start;
    padding: 14px 12px 14px 28px;
  }

  .wishlist-card .card-select {
    top: 10px;
    left: 7px;
    padding: 0;
    background: transparent;
  }

  .wishlist-card .wishlist-image-wrap {
    flex-basis: 82px;
    width: 82px;
    height: 82px;
    margin: 0 11px 0 0;
  }

  .wishlist-card .wishlist-card-body { padding: 0; }
  .wishlist-card .product-heading-row h2 { font-size: 13px; }
  .wishlist-price-col strong { font-size: 14px; }
  .wishlist-card .card-actions { flex-wrap: wrap; row-gap: 7px; }
}

@media (max-width: 380px) {
  .wishlist-card .product-heading-row { flex-direction: column; }
  .wishlist-price-col { margin-top: 3px; text-align: left; }
  .wishlist-price-col div { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .wishlist-page *,
  .wishlist-page *::before,
  .wishlist-page *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
