/* =============================================================================
   PROBAR - LISTA DEI DESIDERI
   -----------------------------------------------------------------------------
   Percorso: [child]/css/wishlist-ui.css - caricato sitewide (il cuore compare
   su catalogo, scheda prodotto e carrello; la pagina lista vive nell'account).
   Stessa casa del resto del sito: nero, oro, card con bordo dorato tenue.
   ============================================================================= */

:root {
  --wl-gold: #FFCE53;
  --wl-gold-line: rgba(255, 206, 83, 0.18);
  --wl-panel: #0a0a0a;
  --wl-line: rgba(255, 255, 255, 0.10);
  --wl-muted: rgba(255, 255, 255, 0.55);
  --wl-ok: #35c26b;
  --wl-err: #ff6b6b;
  --wl-ease: cubic-bezier(0.16, 1, 0.30, 1);
}

/* ==========================================================================
   1. IL CUORE - la stessa pasticca ovunque, tre contesti
   ========================================================================== */
/* Tre stati, la stessa grammatica ovunque:
   RIPOSO   cerchio nero in trasparenza, cuore a tratto BIANCO
   HOVER    bordo del cerchio e cuore ORO, con il bagliore di casa
   ATTIVO   sfondo e cuore DORATI, bordi del cerchio e del cuore NERI */
.abm-wl-heart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.85);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  transition: color 0.3s var(--wl-ease), border-color 0.3s var(--wl-ease),
              background-color 0.3s var(--wl-ease), box-shadow 0.3s var(--wl-ease),
              transform 0.3s var(--wl-ease);
}

.abm-wl-heart svg {
  width: 18px;
  height: 18px;
  display: block;
}

.abm-wl-heart:hover {
  color: var(--wl-gold);
  border-color: var(--wl-gold);
  box-shadow: 0 0 14px rgba(255, 206, 83, 0.45);
  transform: scale(1.06);
}

/* Cliccato: cerchio e cuore d'oro pieno, contorni neri */
.abm-wl-heart.is-active {
  background: var(--wl-gold);
  border-color: #111;
  color: #111;
  box-shadow: none;
}

.abm-wl-heart.is-active svg {
  fill: var(--wl-gold);
  stroke: #111;
}

.abm-wl-heart.is-active:hover {
  box-shadow: 0 0 14px rgba(255, 206, 83, 0.45);
}

.abm-wl-heart.is-busy { opacity: 0.5; pointer-events: none; }

/* --- Nelle griglie: appoggiato sull'angolo della foto --- */
.woocommerce ul.products li.product { position: relative; }

.abm-wl-heart--loop {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  width: 34px;
  height: 34px;
}

/* --- Nella scheda prodotto: il cuore PARLA ---
   Pillola con icona + "Aggiungi alla mia lista dei desideri".
   Hover: sfondo dorato, testo e cuore neri. Attivo: dorato pieno. */
.abm-wl-heart--single {
  width: auto;
  height: auto;
  gap: 9px;
  margin: 6px 0 14px;
  padding: 10px 20px;
  border-radius: 24px;
}

.abm-wl-heart--single .abm-wl-heart__label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.abm-wl-heart--single:hover {
  background: var(--wl-gold);
  border-color: var(--wl-gold);
  color: #111;
  transform: none;
}

.abm-wl-heart--single.is-active {
  background: var(--wl-gold);
  border-color: #111;
  color: #111;
}

/* ==========================================================================
   2. CARRELLO - "sposta nella lista dei desideri"
   ========================================================================== */
.abm-wl-move-wrap { display: block; margin-top: 6px; }

.abm-wl-move {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--wl-muted) !important;
  font-size: 12px !important;
  text-decoration: none !important;
  transition: color 0.3s var(--wl-ease);
}

.abm-wl-move:hover { color: var(--wl-gold) !important; }

.abm-wl-move__icon { width: 13px; height: 13px; }

/* ==========================================================================
   3. LA PAGINA LISTA (endpoint account)
   ========================================================================== */

/* --- Toolbar delle azioni di massa --- */
.abm-wl-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
  padding: 16px 18px;
  background: var(--wl-panel);
  border: 1px solid var(--wl-line);
  border-radius: 14px;
}

.abm-wl-selectall {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--wl-muted);
  font-size: 13px;
  cursor: pointer;
}

.abm-wl-selectall input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--wl-gold);
  cursor: pointer;
}

.abm-wl-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* --- Pulsanti (pieno oro / contorno) --- */
.abm-wl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 22px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none !important;
  cursor: pointer;
  transition: background-color 0.3s var(--wl-ease), border-color 0.3s var(--wl-ease), transform 0.3s var(--wl-ease);
}

.abm-wl-btn--gold {
  background: var(--wl-gold);
  border: 1px solid var(--wl-gold);
  color: #111 !important;
}

.abm-wl-btn--gold:hover {
  background: #ffd977;
  transform: translateY(-1px);
}

.abm-wl-btn--outline {
  background: transparent;
  border: 1px solid var(--wl-gold-line);
  color: var(--wl-gold) !important;
}

.abm-wl-btn--outline:hover { border-color: var(--wl-gold); }

.abm-wl-btn.is-busy { opacity: 0.6; pointer-events: none; }
.abm-wl-btn.is-done {
  background: rgba(53, 194, 107, 0.15);
  border-color: rgba(53, 194, 107, 0.4);
  color: var(--wl-ok) !important;
}

/* --- La griglia, speculare al catalogo --- */
.abm-wl-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}

.abm-wl-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--wl-panel);
  border: 1px solid var(--wl-line);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.35s var(--wl-ease);
}

.abm-wl-card:hover { border-color: var(--wl-gold-line); }

.abm-wl-card__check {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
  cursor: pointer;
}

.abm-wl-card__check input {
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: var(--wl-gold);
  cursor: pointer;
}

.abm-wl-card__remove {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--wl-line);
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.85);
  color: var(--wl-muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.3s var(--wl-ease), border-color 0.3s var(--wl-ease);
}

.abm-wl-card__remove:hover {
  color: var(--wl-err);
  border-color: var(--wl-err);
}

.abm-wl-card__thumb {
  position: relative;
  display: block;
  background: #fff;
}

.abm-wl-card__thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}

.abm-wl-promo {
  position: absolute;
  bottom: 8px;
  left: 8px;
  padding: 3px 10px;
  border-radius: 14px;
  background: var(--wl-gold);
  color: #111;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.abm-wl-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 14px 8px;
  text-align: center;
}

.abm-wl-card__title {
  color: #fff !important;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none !important;
}

.abm-wl-card__title:hover { color: var(--wl-gold) !important; }

.abm-wl-card__price {
  color: #fff;
  font-size: 14px;
}

.abm-wl-card__price del { color: var(--wl-gold); opacity: 0.8; margin-right: 4px; }
.abm-wl-card__price ins { text-decoration: none; font-weight: 600; }

/* Badge di magazzino */
.abm-wl-badge {
  align-self: center;
  padding: 3px 11px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.abm-wl-badge--ok  { background: rgba(53, 194, 107, 0.12);  color: var(--wl-ok); }
.abm-wl-badge--low { background: rgba(255, 206, 83, 0.12);  color: var(--wl-gold); }
.abm-wl-badge--out { background: rgba(255, 107, 107, 0.12); color: var(--wl-err); }

.abm-wl-card__actions {
  padding: 10px 14px 16px;
  text-align: center;
}

.abm-wl-card__actions .abm-wl-btn { width: 100%; }

/* --- Stato vuoto --- */
.abm-wl-empty {
  padding: 60px 20px;
  text-align: center;
  border: 1px solid var(--wl-line);
  border-radius: 16px;
}

.abm-wl-empty__title {
  margin: 0 0 8px;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
}

.abm-wl-empty__sub {
  margin: 0 0 22px;
  color: var(--wl-muted);
  font-size: 14px;
}

/* ==========================================================================
   4. MOBILE
   ========================================================================== */
@media (max-width: 640px) {
  .abm-wl-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .abm-wl-toolbar { flex-direction: column; align-items: stretch; }
  .abm-wl-toolbar__actions { flex-direction: column; }
  .abm-wl-btn { width: 100%; }
}
