/* =====================================================================
   Favorites — drawer dreapta + heart icon pe produse + empty state.
   Folosește aceleași tokens ca tema (Inter 200, accent coral, radius 18).
   ===================================================================== */

/* ---------- Heart toggle pe carduri / PDP ---------- */
.id-fav-btn {
  background: rgba(255,255,255,0.95);
  border: 0;
  width: 36px; height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #666;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform .15s, color .15s, background .15s;
  position: absolute;
  top: 12px; right: 12px;
  z-index: 2;
}
.id-fav-btn:hover { transform: scale(1.08); color: #ff5555; }
.id-fav-btn.is-active {
  background: #ff5555;
  color: #fff;
}
.id-fav-btn.is-active svg { fill: #fff; }
.id-fav-btn svg { transition: fill .15s; }

/* PDP — varianta inline lângă titlu (nu floating) */
.id-fav-btn--inline {
  position: static;
  background: transparent;
  box-shadow: none;
  width: 44px; height: 44px;
  color: #1a1a1a;
}
.id-fav-btn--inline:hover { background: #f5f5f5; }
.id-fav-btn--inline.is-active { background: transparent; color: #ff5555; }
.id-fav-btn--inline.is-active svg { fill: #ff5555; }

/* ---------- Drawer (slide din dreapta) ---------- */
.id-fav-drawer {
  position: fixed;
  top: 0; right: 0;
  width: 420px;
  max-width: 92vw;
  height: 100vh;
  background: #fff;
  z-index: 70;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,0.08);
}
.id-fav-drawer.is-open { transform: translateX(0); }

.id-fav-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}
.id-fav-drawer__title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: #888;
  margin: 0;
  text-transform: uppercase;
}
.id-fav-drawer__close {
  background: transparent;
  border: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  color: #1a1a1a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.id-fav-drawer__close:hover { background: #f5f5f5; }

.id-fav-drawer__list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

/* ---------- Item în drawer ---------- */
.id-fav-item {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 14px;
  transition: background .15s;
  margin-bottom: 4px;
}
.id-fav-item:hover { background: #f8f8f8; }
.id-fav-item__link {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  text-decoration: none;
  color: #1a1a1a;
  border-radius: 14px;
}
.id-fav-item__media {
  width: 64px; height: 64px;
  border-radius: 12px;
  overflow: hidden;
  background: #f0f0f0;
  flex-shrink: 0;
}
.id-fav-item__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.id-fav-item__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.id-fav-item__name {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
  color: #1a1a1a;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.id-fav-item__price {
  font-size: 13px;
  font-weight: 500;
  color: #1a1a1a;
}
.id-fav-item__remove {
  background: transparent;
  border: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  color: #888;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  flex-shrink: 0;
  transition: color .15s, background .15s;
}
.id-fav-item__remove:hover {
  color: #ff5555;
  background: rgba(255,85,85,0.08);
}

/* ---------- Empty state ---------- */
.id-fav-empty {
  text-align: center;
  padding: 60px 24px;
  color: #1a1a1a;
}
.id-fav-empty svg {
  color: #ddd;
  margin: 0 auto 16px;
  display: block;
}
.id-fav-empty__title {
  font-size: 17px;
  font-weight: 400;
  margin: 0 0 6px;
}
.id-fav-empty__sub {
  font-size: 13px;
  color: #888;
  font-weight: 300;
  margin: 0;
  max-width: 260px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

/* ---------- Overlay ---------- */
.id-fav-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 65;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
body.id-fav-open .id-fav-drawer-overlay {
  opacity: 1;
  visibility: visible;
}
body.id-fav-open { overflow: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
  .id-fav-btn { width: 32px; height: 32px; top: 8px; right: 8px; }
  .id-fav-drawer { width: 100vw; }
}
