/* css/favorites.css */

.carousel-wrapper{
  position: relative;
}

.zb-fav-btn{
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;
  touch-action: manipulation;
}

.zb-fav-btn svg{
  width: 22px;
  height: 22px;
  display: block;
  fill: rgba(255,255,255,0.0);
  stroke: rgba(255,255,255,0.96);
  stroke-width: 2.2;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.55));
}

.zb-fav-btn.active svg{
  fill: rgba(225,29,72,0.98);
  stroke: rgba(255,255,255,0.0);
}

.price-overlay{ z-index: 10; }

.zb-fav-removing{
  transition: opacity 140ms ease;
  opacity: 0;
}

.header-fav-btn{
  min-width: 44px;
  height: 44px;
  margin-right: 12px;
  padding: 0 12px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-fav-btn svg{
  width: 22px;
  height: 22px;
  display: block;
  fill: rgba(0,0,0,0.0);
  stroke: rgba(0,0,0,0.92);
  stroke-width: 2.2;
  transform: translateY(1px);
}

.header-fav-btn .fav-back{
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.zb-heart-particle{
  position: fixed;
  width: 14px;
  height: 14px;
  pointer-events: none;
  z-index: 99999;
  animation: zb-heart-fly 0.9s ease-out forwards;
}

.zb-heart-particle svg{
  width: 14px;
  height: 14px;
  display: block;
  fill: rgba(225,29,72,0.95);
  stroke: rgba(255,255,255,0.0);
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.35));
}

@keyframes zb-heart-fly{
  0% { transform: translate(0,0) scale(0.7); opacity: 1; }
  100% { transform: translate(var(--x), var(--y)) scale(1.25); opacity: 0; }
}

.zb-fav-hint{
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 18px;
  z-index: 99999;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(17,24,39,.92);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .2px;
  box-shadow: 0 18px 40px rgba(0,0,0,.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.zb-fav-hint.show{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* скрыть полоску в шапке в режиме избранных */
body.zb-fav-mode .header-announce{
  display: none !important;
}

/* swipe: вертикальный скролл ок */
.product-list .card{
  touch-action: pan-y;
}
/* css/favorites.css */

/* 1) в моб версии кнопка избранного должна быть рядом с корзиной справа */
#favHeaderBtn{
  margin-left: auto;     /* толкает избранное + корзину вправо */
  margin-right: 8px;     /* маленький зазор до корзины */
}

/* 2) выровнять кнопку и иконку по центру и по высоте как у корзины */
.header-fav-btn{
  min-width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
}

.header-fav-btn svg{
  width: 22px;
  height: 22px;
  display: block;
  transform: none;       /* убираем сдвиг сердца вниз */
}
/* mobile: keep favorites right next to cart */
@media (max-width: 520px){
  .header{
    justify-content: flex-start !important;
    gap: 10px;
  }

  /* favorites button goes to the right edge, cart stays right next to it */
  #favHeaderBtn{
    margin-left: auto !important;
    margin-right: 0 !important;
  }

  #cartBtn{
    margin-left: 10px !important;
  }

  /* same height and perfect vertical align */
  .header-fav-btn{
    height: 44px;
    min-width: 44px;
    padding: 0;
    align-self: center;
  }

  .header-fav-btn svg{
    transform: none !important; /* remove svg shift */
    display: block;
  }

  .cart-btn{
    align-self: center;
  }
}
/* FORCE favorites next to cart on mobile */
@media (max-width: 520px){

  .header{
    position: relative;
  }

  #cartBtn{
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
  }

  #favHeaderBtn{
    position: absolute;
    right: 64px; /* ровно рядом с корзиной */
    top: 50%;
    transform: translateY(-50%);
  }

  .header-fav-btn,
  .cart-btn{
    height: 44px;
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .header-fav-btn svg{
    transform: none !important;
  }
}
