/*
 * Azzkara — Liste de souhaits (front).
 * Deux contextes :
 *   - PDP : seul ajout = le toast discret (le bouton .pdp__wish est déjà stylé par le thème,
 *     y compris .is-on en rouge). On NE redéfinit PAS .pdp__wish.
 *   - Espace client (#wishlist) : grille de cartes calquée sur les cartes produit du thème
 *     (.card / .ci) avec les tokens :root du thème (--ink-2, --line, --muted, --red…).
 * Aucune police importée : on hérite des familles du thème (var(--font-display)/var(--font-ui)).
 */

/* ============================================================= */
/*  Toast discret (PDP + espace client)                          */
/* ============================================================= */
.azzwl-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 14px);
  z-index: 1200;
  max-width: min(92vw, 360px);
  padding: 12px 18px;
  background: var(--ink-3, #1c1c20);
  color: #fff;
  border: 1px solid var(--line, rgba(255, 255, 255, .1));
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  font-family: var(--font-ui, 'Jost', sans-serif);
  font-size: 13px;
  letter-spacing: .02em;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.azzwl-toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ============================================================= */
/*  Espace client : grille de la liste                           */
/* ============================================================= */
.wl {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.wl__item {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--ink, #0c0c0e);
  border: 1px solid var(--line, rgba(255, 255, 255, .1));
  transition: opacity .2s ease, transform .2s ease, border-color .2s ease;
}
.wl__item:hover {
  border-color: var(--line-2, rgba(255, 255, 255, .16));
}
.wl__item.is-leaving {
  opacity: 0;
  transform: scale(.97);
}

.wl__media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: var(--ink, #0c0c0e);
}
.wl__img {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: contain;
  background: var(--ink, #0c0c0e);
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}
.wl__media:hover .wl__img {
  transform: scale(1.04);
}
.wl__img--ph {
  display: block;
  background: linear-gradient(165deg, #16161a, #0c0c0e);
  box-shadow: inset 0 0 0 1px var(--line, rgba(255, 255, 255, .1));
}

.wl__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  flex: 1 1 auto;
}
.wl__name {
  margin: 0;
  font-family: var(--font-display, 'Cinzel', serif);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.3;
  color: #fff;
}
.wl__name a {
  color: inherit;
  text-decoration: none;
}
.wl__name a:hover {
  color: var(--silver, #c9c9cf);
}
.wl__attr {
  margin: 0;
  font-family: var(--font-ui, 'Jost', sans-serif);
  font-size: 12px;
  color: var(--muted, #8d8d95);
}
.wl__price {
  margin: 2px 0 0;
  font-family: var(--font-ui, 'Jost', sans-serif);
  font-weight: 600;
  font-size: 15px;
  color: #fff;
}

.wl__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
}
.wl__add {
  width: 100%;
  justify-content: center;
  padding: 11px 14px;
  font-size: 11px;
  letter-spacing: .12em;
}
.wl__soldout {
  font-family: var(--font-ui, 'Jost', sans-serif);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted-2, #66666e);
}
.wl__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: none;
  border: 0;
  padding: 4px 0;
  color: var(--muted, #8d8d95);
  font-family: var(--font-ui, 'Jost', sans-serif);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .15s ease;
}
.wl__remove:hover {
  color: var(--red, #b3171d);
}

/* Mobile : rangées pleine largeur et COMPACTES (vignette • titre/prix • actions au bout),
   plutôt que des cartes hautes. */
@media (max-width: 575px) {
  .wl {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .wl__item {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 10px;
  }
  .wl__media {
    width: 72px;
    flex: 0 0 72px;
  }
  .wl__img,
  .wl__img--ph {
    aspect-ratio: 1 / 1;
  }
  .wl__body {
    padding: 0;
    gap: 3px;
    flex: 1 1 auto;
    min-width: 0;
  }
  .wl__name {
    font-size: 13.5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .wl__attr {
    font-size: 11px;
  }
  .wl__price {
    margin: 0;
    font-size: 14px;
  }
  .wl__actions {
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    margin-top: 0;
    padding-top: 0;
    flex: 0 0 auto;
  }
  .wl__add {
    width: auto;
    padding: 9px 12px;
    font-size: 10px;
    letter-spacing: .08em;
    white-space: nowrap;
  }
  .wl__soldout {
    font-size: 11px;
  }
  .wl__remove {
    padding: 0;
    font-size: 10px;
  }
}

/* Arrondi global (piloté par --rounded du thème ; fallback 6px).
   La carte (clippée pour arrondir aussi la photo en haut), le média et le
   bouton d'ajout. Le cœur .wl__remove est texte/icone (rien à arrondir). */
.wl__item { border-radius: var(--rounded, 6px); overflow: hidden; }
.wl__media,
.wl__img,
.wl__img--ph,
.wl__add { border-radius: var(--rounded, 6px); }
