/* === SaadeCom custom styles === */
:root {
  --sc-primary: #0d6efd;
  --sc-primary-dark: #0a58ca;
}

body {
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #f8f9fa;
  color: #212529;
}

a { text-decoration: none; }

/* Header */
.site-header .navbar-brand span { color: var(--sc-primary); }

/* Product card */
.product-card { border: 0; transition: transform .15s ease, box-shadow .15s ease; border-radius: .75rem; overflow: hidden; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.12); }
.product-card .card-img-top { object-fit: cover; height: 180px; background: #fff; }

/* Buttons */
.btn-primary { background-color: var(--sc-primary); border-color: var(--sc-primary); }
.btn-primary:hover { background-color: var(--sc-primary-dark); border-color: var(--sc-primary-dark); }

/* Search suggestions */
.search-suggestions { z-index: 1050; max-height: 320px; overflow-y: auto; display: none; }
.search-suggestions.show, .search-suggestions:not(:empty) { display: block; }

/* Badges promo */
.badge-promo { position: absolute; top: .5rem; left: .5rem; }

/* Footer */
.site-footer { background: #212529; color: #adb5bd; }
.site-footer a { color: #adb5bd; }
.site-footer a:hover { color: #fff; }

/* Utility */
.rounded-4 { border-radius: 1rem !important; }
.text-primary { color: var(--sc-primary) !important; }

/* === Navbar Menu Animations === */
.navbar-nav .nav-link {
  position: relative;
  font-weight: 500;
  transition: color 0.3s ease;
  padding: 0.5rem 1rem;
}
.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: var(--sc-primary);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform: translateX(-50%);
}
.navbar-nav .nav-link:hover {
  color: var(--sc-primary);
}
.navbar-nav .nav-link:hover::after {
  width: 80%;
}

/* === Homepage Category Cards Animations === */
.category-card {
  border-radius: 1.25rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background: #ffffff;
}
.category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.08) !important;
}

.category-icon-wrapper {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,1) 0%, rgba(245,247,250,1) 100%);
  box-shadow: 0 8px 16px rgba(0,0,0,0.04), inset 0 2px 4px rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.category-card:hover .category-icon-wrapper {
  background: var(--cat-color, var(--sc-primary));
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  transform: scale(1.05);
}

.category-icon {
  font-size: 2rem;
  transition: all 0.4s ease;
  z-index: 2;
}

.category-card:hover .category-icon {
  color: #ffffff !important;
  transform: scale(1.1) rotate(5deg);
}

.category-card h5 {
  transition: color 0.3s ease;
}
.category-card:hover h5 {
  color: var(--cat-color, var(--sc-primary));
}

/* === Cartes catégories : image pleine surface + overlay === */
.category-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f1f3f5;
}
.category-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.45s ease;
}
.category-card:hover .category-card-img {
  transform: scale(1.06);
}
.category-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,0.65) 100%);
  pointer-events: none;
}
.category-card-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 0.75rem 1rem;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.55);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 2;
}
.category-card:hover .category-card-title {
  color: #ffffff;
}

/* Carte sans image (mode icône) : ratio constant, hauteur alignée
   sur les cartes avec image. */
.category-card-icon {
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  text-align: center;
}
/* Fallback affiché si le fichier image est manquant/cassé */
.category-card-fallback {
  padding: 1rem 0.5rem;
}
.category-card-fallback:not(.category-card-icon) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  aspect-ratio: 4 / 3;
}

/* === Animation Fly to Cart === */
.fly-to-cart-clone {
  will-change: transform, opacity;
}

/* === Animation Bounce sur le badge panier === */
@keyframes cartBadgeBounce {
  0%, 100% { transform: translate(-50%, 0) scale(1); }
  25% { transform: translate(-50%, 0) scale(1.4); }
  50% { transform: translate(-50%, 0) scale(0.85); }
  75% { transform: translate(-50%, 0) scale(1.15); }
}

.cart-badge-bounce {
  animation: cartBadgeBounce 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* === Notification moderne ajout panier === */
.cart-notification {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  min-width: 340px;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 20px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.12),
    0 8px 24px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.5);
  overflow: hidden;
  transform: translateX(120%) scale(0.9);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

.cart-notification.show {
  transform: translateX(0) scale(1);
  opacity: 1;
}

.cart-notification.hide {
  transform: translateX(120%) scale(0.9);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.55, 0, 0.55, 0.2);
}

.cart-notification-content {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
}

.cart-notification-icon {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  overflow: visible;
  flex-shrink: 0;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.1);
}

.cart-notification-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

.cart-notification-icon i {
  font-size: 1.6rem;
  color: var(--sc-primary);
}

.cart-notification-check {
  position: absolute;
  bottom: -6px;
  right: -6px;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.85rem;
  font-weight: bold;
  box-shadow: 0 3px 10px rgba(34, 197, 94, 0.4);
  animation: checkPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
}

@keyframes checkPop {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

.cart-notification-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.cart-notification-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #1a1a2e;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-notification-title::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border-radius: 50%;
  color: white;
  font-size: 0.65rem;
}

.cart-notification-product {
  font-size: 0.85rem;
  color: #4a5568;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-notification-count {
  font-size: 0.75rem;
  color: #94a3b8;
}

.cart-notification-action {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--sc-primary) 0%, var(--sc-primary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(13, 110, 253, 0.35);
}

.cart-notification-action:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(13, 110, 253, 0.5);
  color: white;
}

.cart-notification-progress {
  height: 4px;
  background: linear-gradient(90deg, var(--sc-primary) 0%, #6366f1 50%, #22c55e 100%);
  border-radius: 0 0 20px 20px;
  animation: progressShrink 3.5s linear forwards;
  transform-origin: left;
}

@keyframes progressShrink {
  0% { transform: scaleX(1); }
  100% { transform: scaleX(0); }
}

/* Responsive notification */
@media (max-width: 480px) {
  .cart-notification {
    top: 12px;
    right: 12px;
    left: 12px;
    min-width: auto;
    max-width: none;
  }
}

/* ============================================
   MODERN POPUP - Système de popup sophistiqué
   ============================================ */

.modern-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-popup-overlay.show {
  opacity: 1;
}

.modern-popup-overlay.hide {
  opacity: 0;
  pointer-events: none;
}

.modern-popup {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 24px;
  padding: 40px 32px 32px;
  text-align: center;
  box-shadow:
    0 25px 60px -12px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transform: scale(0.8) translateY(30px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modern-popup-overlay.show .modern-popup {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modern-popup-overlay.hide .modern-popup {
  transform: scale(0.9) translateY(10px);
  opacity: 0;
}

/* Icône du popup */
.modern-popup-icon {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 2.2rem;
}

.modern-popup-icon.success {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  color: #16a34a;
}

.modern-popup-icon.error {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #dc2626;
}

.modern-popup-icon.warning {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #d97706;
}

.modern-popup-icon.info {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #2563eb;
}

/* Animation de l'icône */
.modern-popup-overlay.show .modern-popup-icon {
  animation: popupIconPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
}

@keyframes popupIconPop {
  0% { transform: scale(0); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Anneau animé autour de l'icône */
.modern-popup-icon-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0;
}

.modern-popup-overlay.show .modern-popup-icon-ring {
  animation: popupRingPulse 1.2s ease-out 0.3s;
}

@keyframes popupRingPulse {
  0% { transform: scale(0.8); opacity: 0.6; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* Titre et message */
.modern-popup-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.modern-popup-message {
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 28px;
}

/* Boutons d'action */
.modern-popup-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.modern-popup-btn {
  padding: 12px 28px;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.01em;
}

.modern-popup-btn.confirm {
  color: white;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.modern-popup-btn.confirm.success {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
}

.modern-popup-btn.confirm.error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.modern-popup-btn.confirm.warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.modern-popup-btn.confirm.info {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.modern-popup-btn.confirm:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.modern-popup-btn.confirm:active {
  transform: translateY(0) scale(0.97);
}

.modern-popup-btn.cancel {
  background: #f1f5f9;
  color: #475569;
}

.modern-popup-btn.cancel:hover {
  background: #e2e8f0;
  transform: translateY(-2px);
}

.modern-popup-btn.cancel:active {
  transform: translateY(0) scale(0.97);
}

/* Responsive popup */
@media (max-width: 480px) {
  .modern-popup {
    padding: 32px 24px 24px;
    border-radius: 20px;
  }
  .modern-popup-icon {
    width: 64px;
    height: 64px;
    font-size: 1.8rem;
  }
  .modern-popup-actions {
    flex-direction: column-reverse;
  }
  .modern-popup-btn {
    width: 100%;
  }
}
/* ==========================================================
   === Suivi de commande : barre de progression animée ===
   Dégradé fluide, effet shimmer, étapes en cascade et halo
   pulsé sur l'étape active (page détail commande).
   ========================================================== */
.order-tracker {
  --ot-dot: 40px;
  --ot-track: 8px;
  position: relative;
  margin: 1.5rem 0 2rem;
  padding: 0 calc(var(--ot-dot) / 2);
}

/* Piste de fond + remplissage dégradé animé */
.order-tracker-track {
  position: absolute;
  z-index: 1;
  top: calc(var(--ot-dot) / 2 - var(--ot-track) / 2);
  left: calc(var(--ot-dot) / 2);
  right: calc(var(--ot-dot) / 2);
  height: var(--ot-track);
  border-radius: 999px;
  background: #e9ecef;
  box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.08);
}

.order-tracker-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--progress, 0%);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sc-primary) 0%, #6366f1 45%, #22c55e 100%);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.45);
  overflow: hidden;
  animation: otFill 1.15s cubic-bezier(0.22, 1, 0.36, 1) 0.45s both;
}

/* Balayage lumineux (shimmer) sur la partie remplie */
.order-tracker-fill::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.55) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: otShimmer 2.6s ease-in-out 1.8s infinite;
}

/* Étapes */
.order-tracker-steps {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
}

.order-tracker-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.order-tracker-dot {
  width: var(--ot-dot);
  height: var(--ot-dot);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  background: #eef2f7;
  color: #94a3b8;
  border: 3px solid #fff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.1);
  animation: otDotPop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: calc(0.35s + var(--i) * 0.13s);
}

/* Étape terminée : pastille dégradée + coche */
.order-tracker-step.is-done .order-tracker-dot {
  background: linear-gradient(135deg, var(--sc-primary) 0%, #6366f1 100%);
  color: #fff;
}

/* Dernière étape terminée (commande livrée) : vert succès */
.order-tracker-step.is-done:last-child .order-tracker-dot {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

/* Étape en cours : pastille blanche + halo pulsé */
.order-tracker-step.is-current .order-tracker-dot {
  background: #fff;
  color: var(--sc-primary);
  border: 2px solid var(--sc-primary);
  animation: otDotPop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) calc(0.35s + var(--i) * 0.13s) both,
             otPulse 2s ease-out calc(1.2s + var(--i) * 0.13s) infinite;
}

.order-tracker-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: #94a3b8;
  white-space: nowrap;
  animation: otLabelIn 0.4s ease both;
  animation-delay: calc(0.55s + var(--i) * 0.13s);
}

.order-tracker-step.is-done .order-tracker-label { color: #475569; }

.order-tracker-step.is-current .order-tracker-label {
  color: var(--sc-primary);
  font-weight: 700;
}

/* Libellé de l'étape en cours (mobile, remplace les libellés masqués) */
.order-tracker-current {
  display: none;
  margin-top: 12px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  animation: otLabelIn 0.4s ease 0.8s both;
}

/* Commande annulée : thème rouge */
.order-tracker.is-cancelled .order-tracker-track { background: #fee2e2; }
.order-tracker.is-cancelled .order-tracker-fill {
  background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.4);
}
.order-tracker.is-cancelled .order-tracker-step.is-current .order-tracker-dot {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  border-color: #fecaca;
  animation: otDotPop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) calc(0.35s + var(--i) * 0.13s) both,
             otPulseDanger 2s ease-out calc(1.2s + var(--i) * 0.13s) infinite;
}
.order-tracker.is-cancelled .order-tracker-step.is-current .order-tracker-label { color: #dc2626; }
.order-tracker.is-cancelled .order-tracker-current { color: #dc2626; }

/* Keyframes du suivi */
@keyframes otFill {
  from { width: 0; }
  to { width: var(--progress, 0%); }
}
@keyframes otShimmer {
  0% { transform: translateX(-100%); }
  55%, 100% { transform: translateX(220%); }
}
@keyframes otDotPop {
  0% { transform: scale(0); opacity: 0; }
  70% { transform: scale(1.18); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes otLabelIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes otPulse {
  0% { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.42); }
  75%, 100% { box-shadow: 0 0 0 13px rgba(13, 110, 253, 0); }
}
@keyframes otPulseDanger {
  0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.45); }
  75%, 100% { box-shadow: 0 0 0 13px rgba(220, 38, 38, 0); }
}

/* === Mini barre de progression des cartes "Mes commandes" === */
.order-card-item { overflow: hidden; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.order-card-item:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12) !important; }

.order-mini-progress {
  position: relative;
  height: 6px;
  margin: 0 1rem 1rem;
  border-radius: 999px;
  background: #e9ecef;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.08);
}

.order-mini-progress-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--progress, 0%);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sc-primary) 0%, #6366f1 55%, #22c55e 100%);
  animation: otFill 1s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

.order-mini-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.5) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: otShimmer 3s ease-in-out 1.6s infinite;
}

/* Commande annulée : mini barre rouge */
.order-mini-progress-fill.is-cancelled {
  background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

/* === Responsive : tracker compact sur mobile === */
@media (max-width: 575.98px) {
  .order-tracker {
    --ot-dot: 34px;
    --ot-track: 6px;
  }
  /* Seuls les points restent, les libellés passent sous forme d'un résumé */
  .order-tracker-label { display: none; }
  .order-tracker-current { display: block; }
  .order-tracker-dot { font-size: 0.9rem; }
}

/* === RTL (arabe) : miroir du dégradé et du shimmer === */
[dir="rtl"] .order-tracker-fill,
[dir="rtl"] .order-mini-progress-fill {
  left: auto;
  right: 0;
  background: linear-gradient(270deg, var(--sc-primary) 0%, #6366f1 45%, #22c55e 100%);
  animation-name: otFill;
}
[dir="rtl"] .order-mini-progress-fill {
  background: linear-gradient(270deg, var(--sc-primary) 0%, #6366f1 55%, #22c55e 100%);
}
[dir="rtl"] .order-tracker-fill::after,
[dir="rtl"] .order-mini-progress-fill::after {
  animation-name: otShimmerRtl;
}
[dir="rtl"] .order-mini-progress-fill.is-cancelled {
  background: linear-gradient(270deg, #ef4444 0%, #dc2626 100%);
}
@keyframes otShimmerRtl {
  0% { transform: translateX(100%); }
  55%, 100% { transform: translateX(-220%); }
}

/* === Accessibilité : réduire les animations si demandé === */
@media (prefers-reduced-motion: reduce) {
  .order-tracker-fill,
  .order-tracker-fill::after,
  .order-tracker-dot,
  .order-tracker-label,
  .order-tracker-current,
  .order-mini-progress-fill,
  .order-mini-progress-fill::after,
  .order-card-item {
    animation: none !important;
    transition: none !important;
  }
  .order-tracker-fill::after,
  .order-mini-progress-fill::after { display: none; }
}

/* ============================================
   PANIER — articles & stepper de quantité
   ============================================ */

/* Desktop : grid 1 ligne — vignette / infos / (stepper + total). */
.list-group-item.cart-item {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) auto;
  grid-template-areas: "thumb info meta";
  gap: 1rem;
  align-items: center;
}
.cart-item-thumb { grid-area: thumb; }
.cart-item-info { grid-area: info; min-width: 0; }
.cart-item-info h6 { overflow-wrap: anywhere; }
.cart-item-meta {
  grid-area: meta;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-width: 0;
}
.cart-item-total { text-align: end; min-width: 0; }

/* Stepper « pilule » [−] 2 [+] — suit la couleur de marque de la boutique
   (variables --bs-primary / --btn-hover-color définies via les réglages DB). */
.qty-stepper {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  gap: 2px;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 999px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.qty-stepper:focus-within {
  border-color: var(--bs-primary, #0d6efd);
  box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb, 13, 110, 253), .15);
}
.qty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #495057;
  line-height: 1;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, transform .1s ease;
}
.qty-btn:hover {
  background: rgba(var(--bs-primary-rgb, 13, 110, 253), .1);
  color: var(--bs-primary, #0d6efd);
}
.qty-btn:active { transform: scale(.9); }
.qty-btn-plus { background: var(--bs-primary, #0d6efd); color: #fff; }
.qty-btn-plus:hover { background: var(--btn-hover-color, #0a58ca); color: #fff; }
.qty-stepper .cart-qty {
  width: 2.4em;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: center;
  font-weight: 600;
  font-size: .95rem;
  color: inherit;
  -moz-appearance: textfield;
  appearance: textfield;
}
.qty-stepper .cart-qty:focus { outline: none; }
.qty-stepper .cart-qty::-webkit-outer-spin-button,
.qty-stepper .cart-qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Mobile : vignette + infos en haut, puis stepper et total sur une ligne
   pleine largeur (jamais d'empilement vertical du input-group Bootstrap). */
@media (max-width: 575.98px) {
  .list-group-item.cart-item {
    grid-template-columns: 64px minmax(0, 1fr);
    grid-template-areas:
      "thumb info"
      "meta  meta";
    gap: 0.75rem;
  }
  .cart-item-thumb {
    grid-area: thumb;
    width: 64px;
    height: 64px;
    object-fit: cover;
  }
  .cart-item-info {
    grid-area: info;
    min-width: 0; /* autorise la césure des noms de produits longs */
  }
  .cart-item-info h6 { overflow-wrap: anywhere; }
  .cart-item-meta { gap: 0.75rem; }
  /* Cibles tactiles : pilule ~44px de haut, boutons 40px, champ 16px (anti-zoom iOS). */
  .qty-btn { width: 40px; height: 40px; }
  .qty-stepper .cart-qty { width: 2.6em; font-size: 1rem; }
}

/* ANASMARKET RESPONSIVE PATCH V1 */

@media (max-width: 575.98px) {
  .cart-notification {
    left: 12px;
    right: 12px;
    width: auto;
    min-width: 0;
    max-width: none;
  }

  .modern-popup-overlay {
    padding: 12px;
  }

  .list-group-item.cart-item {
    min-width: 0;
  }

  .cart-item-meta {
    flex-wrap: wrap;
    min-width: 0;
  }

  .cart-item-info,
  .cart-item-total {
    overflow-wrap: anywhere;
  }
}

@media (min-width: 576px) and (max-width: 991.98px) {
  .cart-notification {
    max-width: min(420px, calc(100vw - 48px));
    min-width: 0;
  }

  .list-group-item.cart-item {
    gap: 0.75rem;
  }

  .cart-item-meta {
    gap: 0.75rem;
    flex-wrap: wrap;
  }
}

/* ANASMARKET STOREFRONT RESPONSIVE V7 */

/* Catalogue : panneau de filtres */
.anas-catalog-filters {
  min-width: 0;
}

.anas-filter-content {
  min-width: 0;
}

@media (min-width: 992px) {
  .anas-filter-panel > .anas-filter-content {
    display: block !important;
  }
}

@media (max-width: 991.98px) {
  .anas-catalog-filters {
    width: 100%;
    flex: 0 0 100%;
  }

  .anas-filter-panel {
    margin-bottom: 16px;
  }

  .anas-filter-toggle {
    display: block;
    padding: 13px 16px;
    border: 1px solid var(--bs-primary, #0d6efd);
    border-radius: 10px;
    color: var(--bs-primary, #0d6efd);
    font-weight: 600;
    cursor: pointer;
    background: #fff;
  }

  .anas-filter-panel[open] .anas-filter-toggle {
    border-radius: 10px 10px 0 0;
  }

  .anas-filter-content {
    padding-top: 12px;
  }

  .anas-filter-content .card {
    margin-bottom: 0 !important;
  }
}

/* Fiche produit */
.anas-weight-controls,
.anas-product-actions {
  min-width: 0;
}

.anas-product-actions > .btn.flex-grow-1 {
  min-width: 0;
  white-space: normal;
}

@media (max-width: 575.98px) {
  .anas-weight-controls {
    flex-wrap: wrap;
  }

  .anas-weight-controls > .input-group {
    width: min(220px, 100%) !important;
    flex-shrink: 0;
  }

  .anas-weight-controls > .text-muted {
    flex: 0 0 100%;
    overflow-wrap: anywhere;
  }

  .anas-product-actions {
    flex-wrap: wrap;
  }

  .anas-product-actions > .input-group {
    width: min(140px, 100%) !important;
    flex-shrink: 0;
  }

  .anas-product-actions > .btn.flex-grow-1 {
    flex: 1 1 150px;
    font-size: 15px;
  }

  .anas-product-actions > .btn-outline-danger {
    flex-shrink: 0;
  }
}
