/* =========================================================
 * CONTENEUR PRINCIPAL
 * ========================================================= */
.frigo-cod-box {
  width: 100%;
  max-width: 650px;
  margin: 0 auto 30px auto;
  padding: 28px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow:
    0 12px 32px -4px rgba(15, 23, 42, 0.06),
    0 4px 12px -2px rgba(15, 23, 42, 0.03);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  box-sizing: border-box;
}

.frigo-cod-box * {
  box-sizing: border-box;
}

/* EN-TÊTE */
.frigo-cod-header {
  text-align: center;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}

.frigo-cod-title {
  font-size: 21px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.frigo-cod-subtitle {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

/* =========================================================
 * SECTION OFFRES ENCADRÉE & ATTRAYANTE
 * ========================================================= */
.frigo-cod-offers {
  position: relative;
  margin: 24px 0 26px 0;
  padding: 22px 14px 14px 14px;
  border: 2px dashed #1d4ed8;
  border-radius: 14px;
  background: linear-gradient(180deg, #f0f7ff 0%, #ffffff 100%);
  box-shadow: 0 4px 16px rgba(29, 78, 216, 0.06);
}

.frigo-cod-offers-title {
  position: absolute;
  top: -14px;
  left: 16px;
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  color: #ffffff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 3px 8px rgba(29, 78, 216, 0.3);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  max-width: calc(100% - 32px);
}

.frigo-cod-offers-title::before {
  content: "🎁";
  font-size: 13px;
  flex-shrink: 0;
}

.frigo-cod-offers-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  margin-top: 6px !important;
}

/* CARTES D'OFFRES
 * IMPORTANT : flex-wrap est activé pour permettre au bloc prix de
 * passer sous le bloc texte sur les très petits écrans (< 400px)
 * sans jamais se chevaucher.
 */
.frigo-offer-card {
  position: relative !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  padding: 12px 14px !important;
  border: 2px solid #cbd5e1 !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  cursor: pointer !important;
  text-align: left !important;
  box-sizing: border-box !important;
  transition: all 0.2s ease !important;
  outline: none;
  row-gap: 6px !important;
}

.frigo-offer-card:hover {
  border-color: #94a3b8 !important;
  background-color: #f8fafc !important;
}

.frigo-offer-card:focus-visible {
  border-color: #1d4ed8 !important;
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.15) !important;
}

.frigo-offer-card.active {
  border-color: #1d4ed8 !important;
  background-color: #f0f7ff !important;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.12) !important;
}

/* BOUTON RADIO VISUEL ET TEXTE A GAUCHE */
.frigo-offer-top {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: auto !important;
  min-width: 0 !important;
  flex-shrink: 1 !important;
}

.frigo-radio-circle {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  border: 2px solid #cbd5e1 !important;
  border-radius: 50% !important;
  position: relative !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
}

.frigo-offer-card.active .frigo-radio-circle {
  border-color: #1d4ed8 !important;
  background-color: #ffffff !important;
}

.frigo-offer-card.active .frigo-radio-circle::after {
  content: "" !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 9px !important;
  height: 9px !important;
  background-color: #1d4ed8 !important;
  border-radius: 50% !important;
}

.frigo-offer-content {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 2px !important;
  min-width: 0 !important;
}

.frigo-offer-content strong {
  display: block !important;
  font-size: 13.5px !important;
  color: #0f172a !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  line-height: 1.2 !important;
}

.frigo-offer-content small {
  display: inline-block !important;
  margin-top: 2px !important;
  color: #dc2626 !important;
  background: #fef2f2 !important;
  border: 1px solid #fee2e2 !important;
  padding: 1px 6px !important;
  border-radius: 12px !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}

/* BLOC PRIX A DROITE (ancien prix / prix remisé / prix unitaire) */
.frigo-offer-prices {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  justify-content: center !important;
  gap: 1px !important;
  margin-top: 0 !important;
  text-align: right !important;
  width: auto !important;
  flex-shrink: 0 !important;
  margin-left: auto !important;
}

.frigo-price-old {
  font-size: 11.5px !important;
  color: #94a3b8 !important;
  text-decoration: line-through !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

.frigo-price-new {
  font-size: 14.5px !important;
  font-weight: 800 !important;
  color: #1d4ed8 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

/* Prix unitaire après remise, ex: "Soit 47,300 DT / pièce" */
.frigo-price-unit {
  font-size: 10.5px !important;
  font-weight: 600 !important;
  color: #64748b !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  margin-top: 1px !important;
}

/* BADGE "MEILLEURE OFFRE" */
.frigo-offer-badge {
  position: absolute !important;
  top: -9px !important;
  right: 12px !important;
  background-color: #ef4444 !important;
  color: #ffffff !important;
  font-size: 9.5px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  padding: 1px 7px !important;
  border-radius: 10px !important;
  letter-spacing: 0.5px !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
  white-space: nowrap !important;
}

/* =========================================================
 * FORMULAIRE
 * ========================================================= */
.frigo-cod-row {
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
}

.frigo-cod-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.frigo-cod-full {
  flex: 100%;
}

.frigo-cod-field label {
  font-size: 11.5px;
  margin-bottom: 6px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.frigo-cod-field label span {
  color: #ef4444;
}

.frigo-cod-field input,
.frigo-cod-field select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  color: #0f172a;
  background-color: #f8fafc;
  transition: all 0.2s ease;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
  box-sizing: border-box;
  /* Empêche le zoom automatique de Safari iOS (qui se déclenche
     si un champ a une taille de police < 16px) */
  font-size: max(14px, 16px);
}

.frigo-cod-field input:hover,
.frigo-cod-field select:hover {
  background-color: #ffffff;
  border-color: #94a3b8;
}

.frigo-cod-field input:focus,
.frigo-cod-field select:focus {
  background-color: #ffffff;
  border-color: #1d4ed8;
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.12);
}

/* =========================================================
 * QUANTITÉ
 * ========================================================= */
.frigo-cod-quantity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0;
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px dashed #cbd5e1;
  flex-wrap: wrap;
  gap: 10px;
}

.frigo-cod-quantity label {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.frigo-cod-quantity-control {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.frigo-cod-quantity-control input {
  width: 48px;
  text-align: center;
  border: none;
  height: 38px;
  font-weight: 700;
  font-size: 15px;
  color: #0f172a;
  -moz-appearance: textfield;
}

.frigo-cod-quantity-control input::-webkit-outer-spin-button,
.frigo-cod-quantity-control input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.frigo-qty-minus,
.frigo-qty-plus {
  width: 38px;
  height: 38px;
  min-width: 38px;
  background: #f1f5f9;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  color: #334155;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.frigo-qty-minus:hover,
.frigo-qty-plus:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* =========================================================
 * RÉSUMÉ DE LA COMMANDE
 * ========================================================= */
.frigo-cod-summary {
  background: #f8fafc;
  padding: 16px 18px;
  border-radius: 10px;
  margin-bottom: 22px;
  border: 1px solid #e2e8f0;
}

.frigo-summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-bottom: 10px;
  color: #64748b;
  gap: 10px;
}

.frigo-summary-line span {
  min-width: 0;
}

.frigo-summary-line strong {
  color: #1e293b;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

#frigo-discount-total {
  color: #dc2626;
  font-weight: 700;
}

.frigo-summary-grand-total {
  border-top: 2px dashed #cbd5e1;
  padding-top: 12px;
  margin-top: 12px;
  margin-bottom: 0;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.frigo-summary-grand-total strong {
  color: #1d4ed8;
  font-size: 19px;
  font-weight: 800;
}

/* =========================================================
 * BOUTON CONFIRMER
 * ========================================================= */
.frigo-cod-submit-button {
  position: relative;
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #ffffff !important;
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: all 0.25s ease;
  overflow: hidden;
}

.frigo-cod-submit-button:hover {
  background: linear-gradient(135deg, #15803d 0%, #166534 100%);
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.45);
  color: #ffffff !important;
  transform: translateY(-2px);
}

.frigo-cod-submit-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
}

.frigo-cod-submit-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

/* =========================================================
 * RESPONSIVE — TABLETTE (≤ 1024px)
 * ========================================================= */
@media screen and (max-width: 1024px) {
  .frigo-cod-box {
    padding: 20px 14px;
  }

  .frigo-offer-card {
    padding: 10px 12px !important;
  }

  .frigo-offer-content strong {
    font-size: 12.5px !important;
  }

  .frigo-price-new {
    font-size: 13.5px !important;
  }

  .frigo-price-old {
    font-size: 11px !important;
  }

  .frigo-price-unit {
    font-size: 10px !important;
  }
}

/* =========================================================
 * RESPONSIVE — MOBILE STANDARD (≤ 576px)
 * ========================================================= */
@media screen and (max-width: 576px) {
  .frigo-cod-box {
    padding: 18px 12px;
    border-radius: 12px;
  }

  .frigo-cod-title {
    font-size: 18px;
  }

  .frigo-cod-row {
    flex-direction: column;
    gap: 12px;
  }

  .frigo-cod-offers {
    padding: 20px 10px 10px 10px;
  }

  .frigo-cod-offers-title {
    font-size: 10px;
    padding: 4px 10px;
  }

  /* Sur mobile, on garde texte à gauche + prix à droite tant qu'il y a
     la place ; le flex-wrap plus haut prend le relais seulement si
     ça ne rentre vraiment plus (très petits écrans, voir plus bas). */
  .frigo-offer-card {
    padding: 10px !important;
    gap: 8px !important;
  }

  .frigo-offer-top {
    gap: 8px !important;
  }

  .frigo-offer-content strong {
    font-size: 12px !important;
  }

  .frigo-offer-content small {
    font-size: 10px !important;
  }

  .frigo-price-new {
    font-size: 13px !important;
  }

  .frigo-price-old {
    font-size: 10.5px !important;
  }

  .frigo-price-unit {
    font-size: 9.5px !important;
  }

  .frigo-cod-quantity {
    padding: 10px 12px;
  }

  .frigo-cod-submit-button {
    padding: 15px;
    font-size: 14.5px;
  }
}

/* =========================================================
 * RESPONSIVE — TRÈS PETITS ÉCRANS (≤ 400px : iPhone SE, vieux Android)
 * C'est ici qu'on empêche activement tout chevauchement : si le texte
 * de gauche et le bloc prix ne tiennent plus sur une seule ligne, le
 * bloc prix passe automatiquement sous le texte grâce au flex-wrap.
 * ========================================================= */
@media screen and (max-width: 400px) {
  .frigo-cod-box {
    padding: 14px 10px;
  }

  .frigo-cod-title {
    font-size: 16.5px;
  }

  .frigo-cod-subtitle {
    font-size: 12px;
  }

  .frigo-cod-offers-title {
    position: static;
    display: inline-flex;
    margin-bottom: 10px;
  }

  .frigo-cod-offers {
    padding: 14px 8px 8px 8px;
  }

  .frigo-offer-card {
    align-items: flex-start !important;
  }

  .frigo-offer-content strong {
    white-space: normal !important;
    font-size: 11.5px !important;
  }

  .frigo-offer-prices {
    align-items: flex-start !important;
    text-align: left !important;
    width: 100% !important;
    margin-left: 26px !important; /* aligne sous le texte, pas sous la puce radio */
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 4px 8px !important;
  }

  .frigo-price-unit {
    width: 100%;
  }

  .frigo-offer-badge {
    top: -8px !important;
    right: 8px !important;
    font-size: 8.5px !important;
  }

  .frigo-cod-quantity {
    flex-direction: column;
    align-items: stretch;
  }

  .frigo-cod-quantity-control {
    align-self: center;
  }

  .frigo-summary-line {
    font-size: 12px;
  }

  .frigo-summary-grand-total strong {
    font-size: 17px;
  }
}

/* =========================================================
 * BOUTON « AJOUTER AU PANIER » (v1.3.2)
 * ========================================================= */
.frigo-cod-cart-actions {
  margin-top: 20px;
  text-align: center;
}

/* séparateur « ou » */
.frigo-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px 0;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.frigo-or::before,
.frigo-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #cbd5e1, transparent);
}

.frigo-add-cart-button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 18px 12px 12px;
  background: linear-gradient(135deg, #1a2b6c 0%, #233a8f 100%);
  color: #ffffff !important;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(26, 43, 108, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}

/* reflet qui traverse le bouton au survol */
.frigo-add-cart-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  pointer-events: none;
}

.frigo-add-cart-button:hover {
  background: linear-gradient(135deg, #15235a 0%, #1a2b6c 100%);
  box-shadow: 0 10px 26px rgba(26, 43, 108, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  color: #ffffff !important;
  transform: translateY(-2px);
}
.frigo-add-cart-button:hover::before {
  left: 130%;
}
.frigo-add-cart-button:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(26, 43, 108, 0.35);
}
.frigo-add-cart-button:focus-visible {
  outline: 3px solid #22c55e;
  outline-offset: 3px;
}

/* pastille de l'icône panier */
.frigo-add-cart-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  box-shadow: 0 3px 10px rgba(22, 163, 74, 0.45);
  transition: transform 0.25s ease;
}
.frigo-add-cart-icon svg {
  width: 24px;
  height: 24px;
  stroke: #ffffff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.frigo-add-cart-button:hover .frigo-add-cart-icon {
  transform: rotate(-8deg) scale(1.06);
}

/* texte sur deux lignes */
.frigo-add-cart-text {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.frigo-add-cart-text strong {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #ffffff;
}
.frigo-add-cart-text small {
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.2;
  color: #c7d0f0;
}

/* flèche à droite */
.frigo-add-cart-arrow {
  flex: 0 0 auto;
  display: inline-flex;
  opacity: 0.7;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.frigo-add-cart-arrow svg {
  width: 20px;
  height: 20px;
  stroke: #ffffff;
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.frigo-add-cart-button:hover .frigo-add-cart-arrow {
  opacity: 1;
  transform: translateX(4px);
}

/* état « ajout en cours » */
.frigo-add-cart-button.is-loading {
  pointer-events: none;
  opacity: 0.9;
}
.frigo-add-cart-button.is-loading .frigo-add-cart-arrow svg {
  display: none;
}
.frigo-add-cart-button.is-loading .frigo-add-cart-arrow::after {
  content: "";
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: frigo-spin 0.7s linear infinite;
}
@keyframes frigo-spin {
  to { transform: rotate(360deg); }
}

.frigo-cod-cart-note {
  margin: 12px 0 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: #64748b;
}

.frigo-cod-cart-box {
  margin-top: 24px;
}
.frigo-cod-cart-box .frigo-summary-line small {
  color: #16a34a;
  font-weight: 700;
}

@media screen and (max-width: 400px) {
  .frigo-add-cart-button { gap: 10px; padding: 10px 12px 10px 10px; }
  .frigo-add-cart-icon { width: 40px; height: 40px; }
  .frigo-add-cart-text strong { font-size: 14.5px; }
  .frigo-add-cart-text small { font-size: 11.5px; }
}

/* Évite le doublon : le bouton « Ajouter au panier » du formulaire COD remplace celui du thème. */
body.frigo-cod-active.single-product form.cart {
  display: none !important;
}

/* Note en arabe sous le bouton « Ajouter au panier » */
.frigo-cod-cart-note-ar {
  margin-top: 4px;
  font-size: 13.5px;
  direction: rtl;
  text-align: center;
}

/* =========================================================
 * ANIMATIONS D'ATTENTION (v1.3.8)
 * ========================================================= */

/* --- Bouton vert « Confirmer la commande » : petite secousse (shake) toutes les 3 secondes --- */
.frigo-cod-submit-button {
  animation: frigo-shake 3s ease-in-out infinite;
}
@keyframes frigo-shake {
  0%, 60%, 100% { transform: translateX(0); }
  64% { transform: translateX(-7px); }
  68% { transform: translateX(7px); }
  72% { transform: translateX(-6px); }
  76% { transform: translateX(6px); }
  80% { transform: translateX(-3px); }
  84% { transform: translateX(3px); }
  88% { transform: translateX(0); }
}
@keyframes frigo-shine {
  0%, 55% { left: -80%; }
  100%    { left: 140%; }
}

/* --- Bouton bleu « Ajouter au panier » : reflet décalé + icône qui s'agite + flèche qui invite --- */
.frigo-add-cart-button::before {
  animation: frigo-shine 3.2s ease-in-out 1.6s infinite;
}
.frigo-add-cart-icon {
  animation: frigo-wiggle 3.2s ease-in-out 1.6s infinite;
}
.frigo-add-cart-arrow {
  animation: frigo-nudge 3.2s ease-in-out 1.6s infinite;
}
@keyframes frigo-wiggle {
  0%, 60%, 100% { transform: rotate(0) scale(1); }
  66% { transform: rotate(-14deg) scale(1.1); }
  72% { transform: rotate(12deg) scale(1.1); }
  78% { transform: rotate(-8deg) scale(1.05); }
  84% { transform: rotate(5deg) scale(1.02); }
  90% { transform: rotate(0) scale(1); }
}
@keyframes frigo-nudge {
  0%, 60%, 100% { transform: translateX(0); opacity: 0.7; }
  70% { transform: translateX(6px); opacity: 1; }
  80% { transform: translateX(0); opacity: 0.85; }
}

/* On coupe les animations quand le client interagit ou pendant le chargement */
.frigo-cod-submit-button:hover,
.frigo-cod-submit-button:active,
.frigo-cod-submit-button:disabled {
  animation: none;
}
.frigo-add-cart-button:hover::before {
  animation: none;
  left: 130%;
}
.frigo-add-cart-button:hover .frigo-add-cart-icon,
.frigo-add-cart-button:hover .frigo-add-cart-arrow,
.frigo-add-cart-button.is-loading .frigo-add-cart-icon,
.frigo-add-cart-button.is-loading .frigo-add-cart-arrow {
  animation: none;
}

/* Accessibilité : pas d'animation si le visiteur les a désactivées dans son système */
@media (prefers-reduced-motion: reduce) {
  .frigo-cod-submit-button,
  .frigo-add-cart-button::before,
  .frigo-add-cart-icon,
  .frigo-add-cart-arrow {
    animation: none !important;
  }
}

/* =========================================================
 * ANIMATION DU BADGE « MEILLEURE OFFRE »
 * ========================================================= */
.frigo-offer-badge {
  /* petit rebond + reflet blanc qui traverse le badge (background-color rouge conservé) */
  background-image: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  background-size: 250% 100%;
  background-repeat: no-repeat;
  animation: frigo-badge-pop 1.8s ease-in-out infinite, frigo-badge-shine 2.6s ease-in-out infinite;
}
/* onde rouge qui s'étend autour du badge */
.frigo-offer-badge::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: inherit;
  background: #ef4444;
  z-index: -1;
  pointer-events: none;
  animation: frigo-badge-ring 1.8s ease-out infinite;
}
@keyframes frigo-badge-pop {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-2px) scale(1.08); }
}
@keyframes frigo-badge-ring {
  0%        { transform: scale(1); opacity: 0.55; }
  80%, 100% { transform: scale(1.5, 1.9); opacity: 0; }
}
@keyframes frigo-badge-shine {
  0%        { background-position: 160% 0; }
  45%, 100% { background-position: -60% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .frigo-offer-badge,
  .frigo-offer-badge::before {
    animation: none !important;
  }
}

/* =========================================================
 * EN-TÊTE DÉCORÉ « COMMANDER DIRECTEMENT » (v1.3.13)
 * ========================================================= */
.frigo-cod-header {
  position: relative;
  overflow: hidden;
  margin-bottom: 22px;
  padding: 22px 16px 18px;
  border-bottom: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #1a2b6c 0%, #233a8f 60%, #2f4ab0 100%);
  box-shadow: 0 10px 22px rgba(26, 43, 108, 0.28);
}
/* cercles décoratifs */
.frigo-cod-header::before,
.frigo-cod-header::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  pointer-events: none;
}
.frigo-cod-header::before { width: 150px; height: 150px; top: -70px; right: -40px; }
.frigo-cod-header::after  { width: 110px; height: 110px; bottom: -55px; left: -30px; }

.frigo-cod-header > * { position: relative; z-index: 1; }

/* pastille verte avec le camion de livraison */
.frigo-cod-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.14), 0 6px 14px rgba(22, 163, 74, 0.5);
}
.frigo-cod-header-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.frigo-cod-header .frigo-cod-title {
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.frigo-cod-header .frigo-cod-subtitle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: #ffffff;
}
.frigo-cod-pay-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 15px 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.frigo-cod-pay-pill svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: #22c55e;
  stroke: #ffffff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media screen and (max-width: 400px) {
  .frigo-cod-header { padding: 18px 12px 15px; }
  .frigo-cod-header .frigo-cod-title { font-size: 19.5px; }
  .frigo-cod-header-icon { width: 46px; height: 46px; }
  .frigo-cod-header-icon svg { width: 25px; height: 25px; }
  .frigo-cod-pay-pill { font-size: 12.5px; }
}
