/* chwishlist.css — Favoris & alertes prix — Cachemire Hermine */

/* ── Variables ───────────────────────────────────────────────────────────── */
:root {
  --chw-accent:        #B89A6A;
  --chw-accent-hover:  #C4A46A;
  --chw-text:          #111111;
  --chw-text-light:    rgba(60, 40, 30, 0.55);
  --chw-bg:            rgba(255, 255, 255, 0.88);
  --chw-radius:        50%;
  --chw-transition:    0.2s ease;
}

/* ── Cœur Unicode (pas Material Icons) ──────────────────────────────────── */
.chw-heart::before {
  content: "\2661"; /* ♡ */
  font-size: 1.2rem;
  line-height: 1;
  color: var(--chw-text-light);
  font-style: normal;
}

.chw-active .chw-heart::before,
.chw-btn-favorite.chw-active .chw-heart::before {
  content: "\2665"; /* ♥ */
  color: var(--chw-accent);
}

/* ── Bouton fiche produit ────────────────────────────────────────────────── */
.chw-product-actions {
  margin-top: 0.75rem;
}

.chw-btn-favorite {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--chw-bg);
  border: 1px solid #d9cfc4;
  border-radius: 2rem;
  padding: 0.45rem 1rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--chw-text);
  text-decoration: none;
  transition: background var(--chw-transition), border-color var(--chw-transition), color var(--chw-transition);
  line-height: 1.4;
}

.chw-btn-favorite:hover {
  background: white;
  border-color: var(--chw-accent);
  color: var(--chw-accent);
  text-decoration: none;
}

.chw-btn-favorite.chw-active {
  border-color: var(--chw-accent);
  color: var(--chw-accent);
}

.chw-btn-favorite.chw-loading {
  opacity: 0.6;
  pointer-events: none;
  cursor: wait;
}

/* ── Lien compte client ──────────────────────────────────────────────────── */
.chw-account-link {
  margin: 0.5rem 0;
}

.chw-account-favorites-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--chw-text);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--chw-transition);
}

.chw-account-favorites-link:hover {
  color: var(--chw-accent);
  text-decoration: none;
}

.chw-heart--sm::before {
  font-size: 1rem;
}

/* ── Page Mes favoris ────────────────────────────────────────────────────── */
.chw-favorites-page {
  padding: 1rem 0 2rem;
}

.chw-favorites-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.chw-favorites-item {
  display: flex;
  flex-direction: column;
  background: #faf8f5;
  border: 1px solid #ede8e0;
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow var(--chw-transition);
}

.chw-favorites-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.chw-favorites-item__image {
  display: block;
  overflow: hidden;
}

.chw-favorites-item__image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform var(--chw-transition);
}

.chw-favorites-item:hover .chw-favorites-item__image img {
  transform: scale(1.03);
}

.chw-no-image {
  display: block;
  width: 100%;
  padding-top: 125%; /* ratio 4:5 */
  background: #ede8e0;
}

.chw-favorites-item__body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.chw-favorites-item__name {
  font-size: 0.875rem;
  color: var(--chw-text);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.chw-favorites-item__name:hover {
  color: var(--chw-accent);
  text-decoration: none;
}

.chw-btn-remove {
  margin-top: auto;
  background: none;
  border: 1px solid #d9cfc4;
  border-radius: 2px;
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  color: var(--chw-text-light);
  cursor: pointer;
  transition: border-color var(--chw-transition), color var(--chw-transition);
  align-self: flex-start;
}

.chw-btn-remove:hover {
  border-color: #c0392b;
  color: #c0392b;
}

.chw-btn-remove.chw-loading {
  opacity: 0.5;
  pointer-events: none;
}

.chw-favorites-empty {
  color: var(--chw-text-light);
  font-size: 0.95rem;
  line-height: 1.6;
  padding: 2rem 0;
}

.chw-favorites-empty a {
  color: var(--chw-accent);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 576px) {
  .chw-favorites-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}
