/**
 * gp_giftcard — configurateur carte cadeau (front, fiche produit).
 * Palette charte Equi-Clic : noir #292e33, bleu #304d6d, rose #cc998d, crème #fff8f3.
 * Le bloc est repositionné par JS en pleine largeur sous la ligne quantité + bouton.
 */
/* Sur une fiche produit carte cadeau, le prix natif (0,00 €) n'a pas de sens :
   le montant réel est choisi au configurateur. Ce fichier n'étant chargé QUE sur
   une fiche carte cadeau (hook displayHeader), la règle reste de portée locale. */
.product-prices { display: none; }

.gpgc-configurator {
  width: 100%;
  margin: 18px 0 4px;
  padding: 20px 22px;
  background: #fff8f3;
  border: 1px solid #ece3db;
  border-radius: 14px;
  box-sizing: border-box;
}

.gpgc-configurator__head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #efe5dc;
}
.gpgc-configurator__icon { font-size: 20px; line-height: 1; }
.gpgc-configurator__title {
  font-size: 16px;
  font-weight: 700;
  color: #292e33;
  letter-spacing: .2px;
}

.gpgc-field { margin-bottom: 18px; }
.gpgc-field:last-child { margin-bottom: 0; }

.gpgc-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: #8a8276;
  margin-bottom: 9px;
}

/* --- Montant : paliers --- */
.gpgc-presets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  gap: 10px;
}
/* Mobile : 2 colonnes (4 paliers = 2 × 2) au lieu de 3 + 1 orphelin, cibles tactiles plus larges. */
@media (max-width: 575px) {
  .gpgc-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gpgc-free { max-width: none; }
  .gpgc-free-input { width: 100%; }
}
.gpgc-preset {
  border: 1.5px solid #e2dacd;
  background: #fff;
  color: #304d6d;
  border-radius: 10px;
  padding: 12px 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s, box-shadow .15s;
}
.gpgc-preset:hover { border-color: #304d6d; }
.gpgc-preset.is-active {
  background: #304d6d;
  color: #fff;
  border-color: #304d6d;
  box-shadow: 0 4px 12px rgba(48, 77, 109, .22);
}

/* --- Montant : libre --- */
.gpgc-free {
  position: relative;
  max-width: 220px;
}
.gpgc-free--custom { margin-top: 10px; }
.gpgc-free-input {
  width: 100%;
  padding: 12px 38px 12px 14px;
  border: 1.5px solid #e2dacd;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  color: #292e33;
  background: #fff;
  box-sizing: border-box;
}
.gpgc-free-input:focus {
  border-color: #304d6d;
  outline: none;
  box-shadow: 0 0 0 3px rgba(48, 77, 109, .12);
}
.gpgc-free__sign {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  color: #8a8276;
  pointer-events: none;
}
.gpgc-hint { font-size: 12.5px; color: #a59a8c; margin-top: 7px; }

/* Montant manquant à l'ajout au panier */
.gpgc-error {
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fbeeea;
  border: 1px solid #cc998d;
  color: #b3402f;
  font-size: 13px;
  font-weight: 600;
}
.gpgc-configurator--error .gpgc-presets .gpgc-preset,
.gpgc-configurator--error .gpgc-free-input { border-color: #cc998d; }

/* Fiche carte cadeau : le stock est « illimité » (999 999, cf. GiftcardWarehouseLinker) → on masque
   le compteur « En stock N produits » du thème, sans intérêt et trompeur pour un produit dématérialisé.
   Ce fichier n'est chargé que sur la fiche d'un produit carte cadeau. */
.product-quantities { display: none !important; }

/* --- Mode : segmenté --- */
.gpgc-mode {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  background: #f1e7dd;
  border-radius: 11px;
}
.gpgc-mode__opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  padding: 9px 16px;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #6f675c;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.gpgc-mode__opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.gpgc-mode__opt.is-active {
  background: #fff;
  color: #304d6d;
  box-shadow: 0 1px 4px rgba(41, 46, 51, .12);
}

/* --- Champs cadeau --- */
.gpgc-gift-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px dashed #e4d9ce;
}
.gpgc-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e2dacd;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: #292e33;
  background: #fff;
  box-sizing: border-box;
  resize: vertical;
}
.gpgc-input::placeholder { color: #b3a99b; }
.gpgc-input:focus {
  border-color: #304d6d;
  outline: none;
  box-shadow: 0 0 0 3px rgba(48, 77, 109, .12);
}

/* Option envoi email */
.gpgc-sendmail {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 13.5px;
  color: #6f675c;
  cursor: pointer;
}
.gpgc-sendmail input { width: 16px; height: 16px; accent-color: #304d6d; }

/* --- Envoi programmé (« à offrir » + e-mail, v0.40.0) --- */
.gpgc-when { margin-top: 12px; }
.gpgc-when[hidden], .gpgc-when__fields[hidden], .gpgc-when__hint[hidden] { display: none !important; }
.gpgc-when__opts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  background: #f1e7dd;
  border-radius: 11px;
}
.gpgc-when__opt {
  display: inline-flex;
  flex: 1 1 auto;
  justify-content: center;
  text-align: center;
  align-items: center;
  padding: 8px 14px;
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: #6f675c;
  border-radius: 8px;
  cursor: pointer;
}
.gpgc-when__opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.gpgc-when__opt.is-active { background: #fff; color: #304d6d; box-shadow: 0 1px 4px rgba(41, 46, 51, .12); }
.gpgc-when__fields { display: flex; gap: 10px; margin-top: 10px; }
.gpgc-when__fields .gpgc-when__date { flex: 1 1 60%; }
.gpgc-when__fields .gpgc-when__time { flex: 0 0 120px; }
.gpgc-when__hint { margin-top: 8px; }
@media (max-width: 575px) {
  .gpgc-when__opts { display: flex; }
  .gpgc-when__opt { flex: 1 1 100%; justify-content: center; }
}
