/* Тема «Сад в посылке». Избранное: сердечко на карточке, кнопка на странице товара, счётчик в шапке, страница списка. */

/* Счётчик в шапке скрыт, пока список пуст (в main.css у .hact__count задан display, он перекрывает атрибут hidden). */
.hact__count[hidden] { display: none; }

/* Без скриптов избранное не работает, поэтому кнопки не показываются. */
.woocommerce-no-js .wish-btn, .woocommerce-no-js .wish-text { display: none; }

/* Сердечко в правом верхнем углу фото: белый кружок 40px, область нажатия добрана до 44px */
.wish-btn { position: absolute; top: 10px; right: 10px; z-index: 2; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--c-surface); color: var(--c-ink); cursor: pointer; }
.wish-btn::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; }
.wish-btn .icon { width: 20px; height: 20px; }
.wish-btn:hover { color: var(--c-green); }
.wish-btn[aria-pressed="true"] { color: var(--c-green); }
.wish-btn[aria-pressed="true"] .icon, .wish-text[aria-pressed="true"] .icon { fill: currentColor; }

/* Кнопка с подписью на странице товара */
.wish-text { display: inline-flex; align-items: center; align-self: flex-start; gap: 8px; min-height: 44px; padding: 0 2px; border: 0; background: transparent; color: var(--c-green); font: 600 var(--fs-sm)/1.2 var(--font-text); text-align: left; cursor: pointer; }
.wish-text .icon { width: 20px; height: 20px; }
.wish-text:hover { color: var(--c-green-dark); text-decoration: underline; }
.wish-text[aria-pressed="true"] .icon { color: var(--c-green); }

/* Страница «Избранное» */
.wishlist__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: var(--s-4); }
.wishlist__bar[hidden], .wishlist__undo[hidden], .wishlist .empty-state[hidden] { display: none; }
.wishlist__count { margin: 0; color: var(--c-muted); }
.wishlist__undo { justify-content: space-between; }
.wishlist__dialog-btns { display: flex; flex-wrap: wrap; gap: 12px; }
.wishlist__dialog-btns .btn { flex: 1 1 200px; }

@media (max-width: 767px) {
  .wish-btn { top: 6px; right: 6px; }
}

@media (prefers-reduced-motion: no-preference) {
  .wish-btn { transition: color 0.15s ease; }
}
