/* 收藏爱心：位置由各卡片自己的 CSS 决定，这里只管外观 */
.wl-heart {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--wl-icon, #2b2420);
  cursor: pointer;
  background: var(--wl-bg, #fff);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease;
}
.wl-heart:hover {
  transform: scale(1.06);
}
.wl-heart__icon path {
  fill: transparent;
  transition: fill 0.2s ease;
}
/* 已收藏：爱心填满 */
.wl-heart[aria-pressed="true"] .wl-heart__icon path {
  fill: currentColor;
}
.wl-heart[aria-pressed="true"] .wl-heart__icon {
  animation: wl-pop 0.3s ease;
}
@keyframes wl-pop {
  50% { transform: scale(1.25); }
}
@media (max-width: 959px) {
  .wl-heart {
    width: 30px;
    height: 30px;
  }
  .wl-heart__icon {
    width: 17px;
    height: 17px;
  }
}

/* 列表页商品卡：爱心在右上角，主题自带的快速加购往下挪一格 */
.card .card-wl {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 3;
  width: 32px;
  height: 32px;
}
.card .card-wl ~ .quick-add {
  top: 40px;
}
@media (max-width: 959px) {
  .card .card-wl {
    top: 10px;
    right: 10px;
  }
  .card .card-wl ~ .quick-add {
    top: 38px;
  }
}

/* ---- 顶栏收藏入口 ---- */
.wl-open {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: inherit;
  line-height: 0;
  cursor: pointer;
  background: none;
  border: 0;
}
.wl-open:hover {
  opacity: 0.75;
}
.wl-open__count {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  color: #2b2420;
  text-align: center;
  background: #efe6da;
  border-radius: 8px;
}
.wl-open__count[hidden] {
  display: none;
}

/* ---- 收藏抽屉：从右侧滑入，米色底 + 深棕字，标题用主题衬线字体 ---- */
html.wl-lock {
  overflow: hidden;
}
.wl-drawer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  visibility: hidden;
}
.wl-drawer.is-open {
  visibility: visible;
}
.wl-drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(43, 36, 32, 0.4);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.wl-drawer.is-open .wl-drawer__overlay {
  opacity: 1;
}
.wl-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(420px, 100%);
  color: #2b2420;
  background: #faf6f0;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.wl-drawer.is-open .wl-drawer__panel {
  transform: none;
}
.wl-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid rgba(43, 36, 32, 0.12);
}
.wl-drawer__title {
  font-family: var(--title-font);
  font-size: 24px;
}
.wl-drawer__close {
  padding: 0 4px;
  font-size: 28px;
  line-height: 1;
  color: inherit;
  cursor: pointer;
  background: none;
  border: 0;
}
.wl-drawer__body {
  flex: 1;
  padding: 8px 24px 24px;
  overflow-y: auto;
}
.wl-drawer__empty {
  margin: 40px 0;
  font-size: 15px;
  line-height: 1.6;
  color: #6b5f55;
  text-align: center;
}
.wl-item {
  position: relative;
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(43, 36, 32, 0.1);
}
.wl-item__img {
  flex: 0 0 104px;
  height: 104px;
  overflow: hidden;
  background: #f1ebe3;
  border-radius: 8px;
}
.wl-item__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wl-item__info {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding-right: 24px;
}
.wl-item__title {
  font-family: var(--title-font);
  font-size: 18px;
  color: inherit;
  text-decoration: none;
}
.wl-item__price {
  font-size: 14px;
}
.wl-item__view {
  margin-top: auto;
  font-size: 13px;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.wl-item__remove {
  position: absolute;
  top: 14px;
  right: 0;
  font-size: 22px;
  line-height: 1;
  color: #8a7d72;
  cursor: pointer;
  background: none;
  border: 0;
}
@media (max-width: 959px) {
  .wl-drawer__head {
    padding: 18px 16px;
  }
  .wl-drawer__body {
    padding: 4px 16px 16px;
  }
  .wl-item__img {
    flex-basis: 88px;
    height: 88px;
  }
}
