.favorites-page {
  min-height: 100dvh;
  position: relative;
  overflow: hidden;
}

.favorites-page-overlay {
  position: fixed;
  inset: 0;
  background: hsla(214, 40%, 15%, 0.42);
  backdrop-filter: blur(3px);
}

.favorites-drawer-shell {
  position: fixed;
  top: 0;
  right: 0;
  width: min(560px, 100vw);
  max-width: 100vw;
  height: 100dvh;
  background: var(--white);
  z-index: 2;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 40px hsla(214, 40%, 15%, 0.18);
}

.favorites-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 1.1rem 1.35rem;
  border-bottom: 1px solid var(--cultured);
}

.favorites-drawer-head h1 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--eerie-black);
}

.favorites-drawer-head p {
  margin: 0.2rem 0 0;
  color: var(--sonic-silver);
  font-size: 0.82rem;
}

.favorites-close-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--sonic-silver);
  background: var(--cultured);
  font-weight: 700;
}

.favorites-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.9rem 1rem 0.5rem;
  display: grid;
  gap: 0.75rem;
}

.favorite-card {
  border: 1px solid hsla(28, 62%, 72%, 0.25);
  border-radius: 18px;
  padding: 0.75rem;
  background: var(--white);
  box-shadow: 0 10px 30px hsla(214, 40%, 15%, 0.06);
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
}

.favorite-card-media {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  background: var(--cultured);
  width: 92px;
  height: 92px;
}

.favorite-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.favorite-card-content {
  min-width: 0;
  display: grid;
  gap: 0.45rem;
}

.favorite-card-title {
  margin: 0;
  font-size: 0.94rem;
  color: var(--eerie-black);
}

.favorite-card-meta {
  display: flex;
  justify-content: flex-start;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.favorite-card-price {
  color: hsl(212, 85%, 42%);
  font-weight: 700;
  font-size: 0.98rem;
}

.favorite-card-category {
  color: var(--sonic-silver);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.favorite-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.favorite-actions .btn-add-cart,
.favorite-actions .btn-cart-add,
.favorite-actions .btn-affiliate,
.favorite-actions .btn-favorite {
  min-height: 40px;
  border-radius: 12px;
  font-weight: 700;
}

.favorite-cta-add {
  background: linear-gradient(135deg, hsl(212, 85%, 42%), hsl(203, 88%, 37%));
  box-shadow: 0 10px 18px hsla(211, 86%, 38%, 0.22);
}

.favorite-cta-buy {
  background: linear-gradient(135deg, #635bff, #5b21b6);
  color: var(--white);
  box-shadow: 0 12px 20px rgba(99, 91, 255, 0.2);
}

.favorite-cta-buy:hover {
  background: linear-gradient(135deg, #5b5cf0, #6d28d9);
  color: var(--white);
}

.favorite-empty {
  padding: 1.2rem;
  border: 1px dashed var(--sandy-brown);
  border-radius: 16px;
  color: var(--sonic-silver);
  font-size: 0.9rem;
  text-align: center;
}

.favorites-drawer-footer {
  border-top: 1px solid var(--cultured);
  padding: 1rem 1.25rem 1.2rem;
  background: var(--white);
  display: grid;
  gap: 0.7rem;
}

.favorites-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.92rem;
}

.favorites-home-link {
  text-decoration: none;
  border: 1px solid var(--sandy-brown);
  border-radius: 14px;
  padding: 0.75rem 0.9rem;
  color: var(--eerie-black);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
}

@media (max-width: 680px) {
  .favorite-card {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .favorite-card-media {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .favorite-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .favorite-actions .btn-add-cart,
  .favorite-actions .btn-cart-add,
  .favorite-actions .btn-affiliate,
  .favorite-actions .btn-favorite {
    width: 100%;
    justify-content: center;
  }
}
