/**
 * gp_wishlist - styles front. Charte Equi-Clic :
 *   noir #292e33, bleu #304d6d, rose/terracotta #cc998d, creme #fff8f3.
 *   Titres Abril Fatface, corps Noto Sans.
 */

/* ============================================================
   Coeur pose sur l'image (vignette listing + cover fiche)
   ============================================================ */
.thumbnail-container { position: relative; }
.images-container { position: relative; }

.gpwl-heart {
  position: absolute;
  bottom: 10px;
  right: 10px;
  top: auto;
  z-index: 5;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 8px rgba(41, 46, 51, 0.18);
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.gpwl-heart svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #304d6d;
  stroke-width: 2;
  transition: fill .15s ease, stroke .15s ease, transform .15s ease;
}
.gpwl-heart:hover { transform: scale(1.08); background: #fff; }
.gpwl-heart:hover svg { stroke: #cc998d; }
.gpwl-heart.is-in svg { fill: #cc998d; stroke: #cc998d; }
.gpwl-heart.is-in { background: #fff; }
.gpwl-heart.is-loading { opacity: .55; pointer-events: none; }
.gpwl-heart.is-loading svg { animation: gpwl-pulse .8s ease-in-out infinite; }
@keyframes gpwl-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(.8); } }

.gpwl-heart--cover { bottom: 14px; right: 14px; top: auto; width: 30px; height: 30px; }
.gpwl-heart--cover svg { width: 15px; height: 15px; }

/* ============================================================
   Popover de choix de liste
   ============================================================ */
.gpwl-pop {
  position: absolute;
  z-index: 1000;
  width: 260px;
  background: #fff;
  border: 1px solid #ece3db;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(41, 46, 51, 0.18);
  padding: 12px;
  font-family: 'Noto Sans', 'Helvetica Neue', Arial, sans-serif;
  color: #292e33;
}
.gpwl-pop__title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: #8a8276;
  margin-bottom: 8px;
}
.gpwl-pop__list { list-style: none; margin: 0 0 8px; padding: 0; max-height: 220px; overflow: auto; }
.gpwl-pop__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  font-size: 14px;
  color: #292e33;
  cursor: pointer;
}
.gpwl-pop__item::before {
  content: '';
  flex-shrink: 0;
  width: 18px; height: 18px;
  border: 2px solid #d9d3c6;
  border-radius: 6px;
  transition: background .15s, border-color .15s;
}
.gpwl-pop__item:hover { background: #fff8f3; }
.gpwl-pop__item.is-in { color: #304d6d; font-weight: 600; }
.gpwl-pop__item.is-in::before {
  background: #cc998d url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/13px no-repeat;
  border-color: #cc998d;
}
.gpwl-pop__create { display: flex; gap: 6px; margin-bottom: 8px; }
.gpwl-pop__create input {
  flex: 1; min-width: 0;
  padding: 8px 10px;
  border: 1px solid #d9d3c6;
  border-radius: 8px;
  font-size: 13px;
}
.gpwl-pop__createbtn {
  flex-shrink: 0;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: #304d6d;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.gpwl-pop__createbtn:hover { background: #243d57; }
.gpwl-pop__manage {
  display: block;
  text-align: center;
  font-size: 12px;
  color: #cc998d;
  text-decoration: none;
  padding-top: 4px;
}
.gpwl-pop__manage:hover { color: #304d6d; text-decoration: underline; }

/* Mobile : le popover devient un bottom-sheet fixe pleine largeur
   (sinon il est positionne pres du coeur et deborde de l'ecran). */
.gpwl-pop__backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(41, 46, 51, 0.45);
}
@media (max-width: 767px) {
  .gpwl-pop {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: 100% !important;
    border-radius: 16px 16px 0 0;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -8px 32px rgba(41, 46, 51, 0.22);
    animation: gpwl-sheet-up .22s ease;
  }
  .gpwl-pop__list { max-height: 45vh; }
  .gpwl-pop__item { padding: 12px 10px; font-size: 15px; }
  .gpwl-pop__create input,
  .gpwl-pop__createbtn { padding: 11px 12px; font-size: 14px; }
  .gpwl-pop__manage { padding-top: 8px; font-size: 13px; }
}
@keyframes gpwl-sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ============================================================
   Pages "Mes listes" / "Produits d'une liste"
   ============================================================ */
/* Pleine largeur des pages wishlist : le layout par defaut met #content-wrapper
   en col-md-6 (demi-largeur) avec colonnes laterales reservees. On masque ces
   colonnes et on rend le contenu pleine largeur, uniquement sur nos pages. */
body[id^="module-gp_wishlist"] #left-column,
body[id^="module-gp_wishlist"] #right-column { display: none !important; }
body[id^="module-gp_wishlist"] #content-wrapper {
  flex: 0 0 100% !important;
  max-width: 100% !important;
  width: 100% !important;
}

.gpwl-page {
  /* width:100% + flex-basis:100% : indispensable car #content-wrapper est un
     conteneur flex et, sans ca, .gpwl-page se reduit a la largeur de son contenu
     (une seule colonne ~360px). */
  width: 100%;
  flex: 1 1 100%;
  box-sizing: border-box;
  max-width: 1280px;
  margin: 0 auto;
  /* plus d'air sous le menu (haut) et avant le footer (bas) */
  padding: 48px 16px 72px;
  font-family: 'Noto Sans', 'Helvetica Neue', Arial, sans-serif;
  color: #292e33;
  font-weight: 300;
}
.gpwl-page__head { margin-bottom: 30px; }
.gpwl-page__head--row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
/* Specificite renforcee (.gpwl-page .gpwl-page__title) + !important pour battre
   les regles globales h1 du theme (police Abril + uppercase). */
.gpwl-page .gpwl-page__title,
h1.gpwl-page__title {
  /* "l'autre" police du site (Noto Sans) plutot que l'Abril Fatface display :
     plus lisible et plus moderne sur ces pages. */
  font-family: 'Noto Sans', 'Helvetica Neue', Arial, sans-serif !important;
  font-weight: 700;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.2px;
  text-transform: none !important;
  margin: 0;
  color: #292e33;
}
.gpwl-page__sub { color: #8a8276; font-size: 14px; margin-top: 8px; font-weight: 300; }

/* Boutons */
.gpwl-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 14px; font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
.gpwl-btn--primary { background: #304d6d; color: #fff; }
.gpwl-btn--primary:hover { background: #243d57; color: #fff; text-decoration: none; }
.gpwl-btn--ghost { background: #fff; color: #304d6d; border-color: #d9d3c6; }
.gpwl-btn--ghost:hover { border-color: #cc998d; color: #cc998d; text-decoration: none; }

/* Creation de liste */
.gpwl-create { display: flex; gap: 10px; margin-bottom: 28px; flex-wrap: wrap; }
.gpwl-create__input {
  flex: 1; min-width: 220px; max-width: 380px;
  padding: 12px 14px;
  border: 1px solid #d9d3c6; border-radius: 10px;
  font-size: 14px; background: #fff;
}
.gpwl-create__input:focus { outline: none; border-color: #304d6d; box-shadow: 0 0 0 3px rgba(48,77,109,.12); }

/* Grille de listes */
.gpwl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.gpwl-card {
  display: flex; flex-direction: column;
  background: #fff8f3;
  border: 1px solid #ece3db;
  border-radius: 16px;
  overflow: hidden;
  transition: box-shadow .15s, transform .15s;
}
.gpwl-card:hover { box-shadow: 0 8px 24px rgba(41,46,51,.10); transform: translateY(-2px); }
.gpwl-card__body {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 26px 18px 18px;
  text-decoration: none; color: #292e33; text-align: center;
}
.gpwl-card__icon {
  width: 52px; height: 52px; margin-bottom: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #f3e7e2; color: #cc998d; border-radius: 50%;
}
.gpwl-card__icon svg { width: 26px; height: 26px; fill: currentColor; }
.gpwl-card__name { font-size: 17px; font-weight: 600; color: #292e33; }
.gpwl-card__count { font-size: 13px; color: #8a8276; }
.gpwl-card__foot {
  margin-top: auto;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 16px;
  border-top: 1px solid #ece3db;
  background: #fff;
}
.gpwl-card__actions { margin-left: auto; display: flex; gap: 6px; }
.gpwl-iconbtn {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #ece3db; border-radius: 8px;
  background: #fff; color: #304d6d; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.gpwl-iconbtn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.gpwl-iconbtn:hover { border-color: #cc998d; color: #cc998d; }
.gpwl-iconbtn--danger:hover { border-color: #c0392b; color: #c0392b; }
.gpwl-chip {
  display: inline-block; padding: 3px 10px; border-radius: 12px;
  background: #e8edf5; color: #304d6d; font-size: 11px; font-weight: 600;
}
.gpwl-card__share { flex-basis: 100%; }
.gpwl-card__share input {
  width: 100%; padding: 8px 10px; margin-top: 2px;
  border: 1px dashed #cc998d; border-radius: 8px;
  font-size: 12px; color: #5a4a42; background: #fff8f3;
}

/* Grille produits d'une liste */
.gpwl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 20px; }
.gpwl-pcard {
  position: relative;
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid #ece3db; border-radius: 14px; overflow: hidden;
  transition: box-shadow .15s, transform .15s;
}
.gpwl-pcard:hover { box-shadow: 0 8px 24px rgba(41,46,51,.10); transform: translateY(-2px); }
.gpwl-pcard__media { display: block; aspect-ratio: 1/1; background: #fafafa; }
.gpwl-pcard__media img { width: 100%; height: 100%; object-fit: contain; }
.gpwl-pcard__body { padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.gpwl-pcard__name { color: #292e33; text-decoration: none; font-size: 14px; line-height: 1.35; }
.gpwl-pcard__name:hover { color: #304d6d; }
.gpwl-pcard__attr {
  display: inline-block;
  align-self: flex-start;
  font-size: 12px;
  color: #5a4a42;
  background: #fff8f3;
  border: 1px solid #ece3db;
  border-radius: 6px;
  padding: 3px 8px;
}
.gpwl-pcard__price { font-weight: 700; color: #304d6d; font-size: 16px; margin-top: auto; padding-top: 4px; }
.gpwl-pcard__oos { font-size: 12px; color: #c0392b; }
.gpwl-pcard__avail { font-size: 12px; font-weight: 500; line-height: 1.3; }
.gpwl-pcard__avail--oos { color: #c0392b; }
.gpwl-pcard__avail--info { color: #5a4a42; }
.gpwl-pcard__avail--ok { color: #27ae60; }
.gpwl-pcard__avail--ok::before,
.gpwl-pcard__avail--info::before { content: "\25CF"; margin-right: 5px; font-size: 9px; vertical-align: middle; }
.gpwl-pcard__avail--ok::before { color: #27ae60; }
.gpwl-pcard__avail--info::before { color: #cc998d; }
.gpwl-pcard__remove {
  position: absolute; top: 8px; right: 8px;
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%;
  background: rgba(255,255,255,.92); color: #292e33;
  box-shadow: 0 2px 8px rgba(41,46,51,.18);
  cursor: pointer; font-size: 18px; line-height: 1;
  transition: background .15s, color .15s;
}
.gpwl-pcard__remove:hover { background: #c0392b; color: #fff; }

.gpwl-empty {
  padding: 60px 20px; text-align: center; color: #8a8276;
  background: #fff8f3; border: 1px dashed #ece3db; border-radius: 16px;
}
.gpwl-empty__icon { font-size: 40px; color: #cc998d; margin-bottom: 10px; }

/* ============================================================
   Lien compte
   ============================================================ */
.gpwl-account-link .material-icons { vertical-align: middle; margin-right: 6px; color: #cc998d; }

@media (max-width: 600px) {
  .gpwl-page__title { font-size: 26px; }
  .gpwl-create__input { max-width: none; }
}
