/* ═══════════════════════════════════════════════════════════════════════════
   AGRICLIC — POP-UP PANIER ULTRA-ÉLÉGANT (STYLE CAPTURE 1)
   Remplacement complet du design par défaut PS9
   ═══════════════════════════════════════════════════════════════════════════ */

/* Modal Dialog & Backdrop Overrides */
#blockcart-modal.modal {
  z-index: 105000 !important;
  padding: 0 !important;
}

#blockcart-modal .modal-backdrop,
.modal-backdrop.show,
.modal-backdrop.fade.in {
  background-color: rgba(15, 23, 42, 0.65) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

#blockcart-modal .modal-dialog {
  max-width: 1040px !important;
  width: 95% !important;
  margin: 3.5vh auto !important;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#blockcart-modal.fade .modal-dialog {
  transform: scale(0.96) translateY(12px) !important;
}

#blockcart-modal.show .modal-dialog,
#blockcart-modal.in .modal-dialog {
  transform: scale(1) translateY(0) !important;
}

/* Modal Content Card */
#blockcart-modal .modal-content {
  background: #ffffff !important;
  border-radius: 28px !important;
  border: none !important;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.25), 0 0 1px 1px rgba(0, 0, 0, 0.04) !important;
  overflow: hidden !important;
  padding: 0 !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  color: #1e293b !important;
  position: relative !important;
}

/* Hide Default PS9 Header */
#blockcart-modal .modal-header {
  display: none !important;
}

/* Modal Body with perfectly balanced left and right padding */
#blockcart-modal .modal-body {
  background: #ffffff !important;
  padding: 34px 38px 34px 38px !important;
  box-sizing: border-box !important;
}

/* Floating Circular Close Button */
.ag-modal-close {
  position: absolute !important;
  top: 20px !important;
  right: 22px !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background: #f1f5f9 !important;
  border: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #64748b !important;
  cursor: pointer !important;
  z-index: 50 !important;
  transition: all 0.2s ease !important;
  padding: 0 !important;
  outline: none !important;
}

.ag-modal-close:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
  transform: scale(1.06) !important;
}

.ag-modal-close:focus,
.ag-modal-close:active {
  outline: none !important;
  box-shadow: none !important;
}

.ag-modal-close svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 2.2;
}

/* Grid Layout using fr units to respect gap without any right-side overflow */
.ag-modal-grid {
  display: grid !important;
  grid-template-columns: 42fr 58fr !important;
  gap: 36px !important;
  align-items: stretch !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   COLONNE GAUCHE : VISUEL & RÉASSURANCE
   ═══════════════════════════════════════════════════════════════════════════ */
.ag-modal-left {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
}

/* Category Badge (like SEMENCES in Capture 1) */
.ag-cat-badge-wrap {
  margin-bottom: 10px !important;
}

.ag-cat-badge {
  display: inline-block !important;
  background: #064e3b !important; /* Deep forest green */
  color: #ffffff !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.8px !important;
  text-transform: uppercase !important;
  padding: 5px 15px !important;
  border-radius: 50px !important;
}

/* Image Showcase Box */
.ag-modal-img-box {
  background: radial-gradient(circle at 50% 50%, #ffffff 40%, #f4faf6 100%) !important;
  border-radius: 20px !important;
  padding: 24px 20px !important;
  position: relative !important;
  height: 340px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid rgba(22, 101, 52, 0.08) !important;
  margin-bottom: 20px !important;
}

.ag-modal-img-main {
  max-height: 250px !important;
  max-width: 90% !important;
  width: auto !important;
  object-fit: contain !important;
  mix-blend-mode: multiply !important;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.06)) !important;
  transition: transform 0.3s ease, opacity 0.2s ease !important;
}

.ag-modal-img-main:hover {
  transform: scale(1.03) !important;
}

/* Carousel Navigation Arrows */
.ag-img-nav-btn {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  background: rgba(30, 41, 59, 0.6) !important;
  color: #ffffff !important;
  border: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  padding: 0 !important;
  z-index: 5 !important;
  outline: none !important;
}

.ag-img-nav-btn:hover {
  background: rgba(15, 23, 42, 0.85) !important;
  transform: translateY(-50%) scale(1.08) !important;
}

.ag-img-nav-btn:focus,
.ag-img-nav-btn:active {
  outline: none !important;
  box-shadow: none !important;
}

.ag-img-nav-prev {
  left: 12px !important;
}

.ag-img-nav-next {
  right: 12px !important;
}

/* Pagination indicator pill */
.ag-img-pagination {
  margin-top: 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  background: #cbd5e1 !important;
  border-radius: 50px !important;
  padding: 3px 6px !important;
  gap: 5px !important;
}

.ag-img-dot {
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.8) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.ag-img-dot.active {
  width: 20px !important;
  border-radius: 50px !important;
  background: #10b981 !important;
}

/* Trust Badges Bar (Bottom left, pill container matching Capture 1) */
.ag-trust-pill-bar {
  border: 1.5px solid #dcfce7 !important;
  background: #ffffff !important;
  border-radius: 50px !important;
  padding: 12px 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02) !important;
}

.ag-trust-item {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #166534 !important;
}

.ag-trust-item svg {
  width: 15px;
  height: 15px;
  stroke: #166534;
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

.ag-trust-divider {
  width: 1px !important;
  height: 14px !important;
  background: #e2e8f0 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   COLONNE DROITE : CONTENU, DÉCLINAISONS, ONGLETS & ACTIONS
   ═══════════════════════════════════════════════════════════════════════════ */
.ag-modal-right {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  min-width: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding-right: 0 !important;
}

/* Rating & Trust validation (Real dynamic reviews) */
.ag-rating-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-bottom: 6px !important;
}

.ag-stars,
.ag-stars-empty {
  display: flex !important;
  gap: 2px !important;
}

.ag-stars svg.star-filled {
  width: 15px;
  height: 15px;
  fill: #f59e0b;
}

.ag-stars svg.star-empty,
.ag-stars-empty svg.star-empty {
  width: 15px;
  height: 15px;
  fill: #e2e8f0;
}

.ag-rating-text {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #475569 !important;
}

.ag-rating-text-empty {
  font-size: 12.5px !important;
  font-weight: 500 !important;
  color: #94a3b8 !important;
}

/* Product Title */
.ag-product-title {
  font-size: 26px !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  line-height: 1.2 !important;
  text-transform: uppercase !important;
  letter-spacing: -0.5px !important;
  margin: 0 0 8px 0 !important;
}

/* Price & Unit */
.ag-price-row {
  display: flex !important;
  align-items: baseline !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin-bottom: 10px !important;
}

.ag-price-val {
  font-size: 28px !important;
  font-weight: 900 !important;
  color: #047857 !important; /* Rich green */
  letter-spacing: -0.5px !important;
  line-height: 1 !important;
}

.ag-price-unit {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #64748b !important;
}

.ag-old-price {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #94a3b8 !important;
  text-decoration: line-through !important;
  margin-left: 6px !important;
}

.ag-discount-badge {
  background: #fef2f2 !important;
  border: 1px solid #fecaca !important;
  color: #dc2626 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  padding: 2px 8px !important;
  border-radius: 6px !important;
}

/* ── Déclinaisons (Formats / Conditionnements) ── */
.ag-combinations-wrap {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  margin-bottom: 14px !important;
}

.ag-comb-label {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #475569 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

.ag-comb-cards {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

.ag-comb-card {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 14px !important;
  border-radius: 10px !important;
  border: 1.5px solid #cbd5e1 !important;
  background: #ffffff !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #334155 !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  outline: none !important;
}

.ag-comb-card:hover {
  border-color: #047857 !important;
  background: #f0fdf4 !important;
  color: #047857 !important;
}

.ag-comb-card.selected {
  border-color: #047857 !important;
  background: #f0fdf4 !important;
  color: #047857 !important;
  box-shadow: 0 2px 8px rgba(4, 120, 87, 0.15) !important;
  cursor: default !important;
}

.ag-comb-card.loading {
  opacity: 0.6 !important;
  pointer-events: none !important;
}

.ag-comb-badge {
  font-size: 10px !important;
  font-weight: 800 !important;
  background: #047857 !important;
  color: #ffffff !important;
  padding: 1px 6px !important;
  border-radius: 4px !important;
  text-transform: uppercase !important;
}

/* Attributes tags (Fallback if no combinations) */
.ag-attributes-wrap {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin-bottom: 14px !important;
}

.ag-attr-pill {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  padding: 4px 10px !important;
  font-size: 12px !important;
  color: #334155 !important;
}

.ag-attr-pill strong {
  color: #0f172a !important;
}

/* ── Interactive Tabs (Clean like Capture 1, NO blue outline) ── */
.ag-tabs-header {
  display: flex !important;
  align-items: center !important;
  gap: 24px !important;
  border-bottom: 1.5px solid #e2e8f0 !important;
  margin-bottom: 12px !important;
  padding-bottom: 0 !important;
}

.ag-tab-btn {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 6px 0 10px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #64748b !important;
  cursor: pointer !important;
  position: relative !important;
  transition: color 0.2s ease !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.ag-tab-btn:hover {
  color: #047857 !important;
}

.ag-tab-btn:focus,
.ag-tab-btn:focus-visible,
.ag-tab-btn:active {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

.ag-tab-btn.active {
  color: #047857 !important;
  font-weight: 700 !important;
}

.ag-tab-btn.active::after {
  content: '' !important;
  position: absolute !important;
  bottom: -1.5px !important;
  left: 0 !important;
  right: 0 !important;
  height: 3px !important;
  background: #047857 !important;
  border-radius: 3px 3px 0 0 !important;
}

/* Tab Panes (Clean typography like Capture 1) */
.ag-tab-pane {
  display: none !important;
  font-size: 13.5px !important;
  line-height: 1.6 !important;
  color: #475569 !important;
  min-height: 65px !important;
  max-height: 95px !important;
  overflow-y: auto !important;
  margin-bottom: 16px !important;
  padding-right: 4px !important;
}

.ag-tab-pane.active {
  display: block !important;
  animation: agFadeIn 0.25s ease !important;
}

@keyframes agFadeIn {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

.ag-tab-pane p {
  margin: 0 !important;
}

.ag-expert-text {
  font-size: 13.5px !important;
  line-height: 1.6 !important;
  color: #334155 !important;
}

.ag-expert-hotline {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-weight: 700 !important;
  color: #15803d !important;
  margin-top: 6px !important;
  font-size: 13px !important;
}

/* Quantity & Subtotal Row (Matching Capture 1) */
.ag-qty-subtotal-box {
  background: #f8fafc !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 16px !important;
  padding: 12px 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 14px !important;
}

.ag-qty-left {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
}

.ag-qty-label {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #1e293b !important;
}

.ag-stepper-wrap {
  display: inline-flex !important;
  align-items: center !important;
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 50px !important;
  padding: 3px 6px !important;
  gap: 6px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.ag-stepper-btn {
  background: #f1f5f9 !important;
  border: none !important;
  color: #1e293b !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  font-size: 17px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  line-height: 1 !important;
  user-select: none !important;
  transition: all 0.15s ease !important;
  outline: none !important;
}

.ag-stepper-btn:hover {
  background: #047857 !important;
  color: #ffffff !important;
  transform: scale(1.08) !important;
}

.ag-stepper-btn:active {
  transform: scale(0.92) !important;
}

.ag-stepper-btn:focus,
.ag-stepper-btn:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.ag-stepper-btn:disabled,
.ag-stepper-btn.disabled {
  opacity: 0.3 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

.ag-stepper-input {
  width: 36px !important;
  border: none !important;
  background: transparent !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  text-align: center !important;
  padding: 0 !important;
  margin: 0 !important;
  outline: none !important;
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}

.ag-stepper-input::-webkit-outer-spin-button,
.ag-stepper-input::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

.ag-qty-right {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
}

.ag-line-subtotal {
  font-size: 20px !important;
  font-weight: 900 !important;
  color: #047857 !important;
  line-height: 1.1 !important;
}

.ag-cart-micro-recap {
  font-size: 11.5px !important;
  color: #64748b !important;
  margin-top: 2px !important;
}

/* ── 3 Action Buttons (CTAs) ── */
.ag-actions-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 12px !important;
  margin-bottom: 10px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.ag-btn-base {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 13px 14px !important;
  border-radius: 14px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  border: none !important;
  text-align: center !important;
  outline: none !important;
  box-sizing: border-box !important;
}

.ag-btn-base:focus,
.ag-btn-base:active {
  outline: none !important;
  box-shadow: none !important;
}

/* Button 1: Jaune Ambré (Continuer mes achats) */
.ag-btn-yellow {
  background: #f59e0b !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3) !important;
}

.ag-btn-yellow:hover {
  background: #d97706 !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.4) !important;
}

.ag-btn-yellow svg {
  width: 18px;
  height: 18px;
  stroke: #ffffff;
  fill: none;
  stroke-width: 2.2;
}

/* Button 2: Orange Vif Éclair (Commander maintenant) */
.ag-btn-orange {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.3) !important;
}

.ag-btn-orange:hover {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%) !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.4) !important;
}

.ag-btn-orange svg {
  width: 18px;
  height: 18px;
  fill: #ffffff;
}

/* Button 3: Vert Menthe (Commander par WhatsApp) */
.ag-btn-whatsapp-full {
  width: 100% !important;
  background: #ecfdf5 !important;
  border: 1.5px solid #a7f3d0 !important;
  color: #065f46 !important;
  border-radius: 14px !important;
  padding: 12px 18px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  outline: none !important;
}

.ag-btn-whatsapp-full:hover {
  background: #d1fae5 !important;
  border-color: #6ee7b7 !important;
  color: #064e3b !important;
  transform: translateY(-1px) !important;
}

.ag-btn-whatsapp-full:focus,
.ag-btn-whatsapp-full:active {
  outline: none !important;
  box-shadow: none !important;
}

.ag-btn-whatsapp-full svg {
  width: 19px;
  height: 19px;
  fill: #10b981;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN (Mobile & Tablette)
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 991px) {
  #blockcart-modal .modal-dialog {
    max-width: 700px !important;
    width: 94% !important;
    margin: 20px auto !important;
  }
  
  .ag-modal-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  #blockcart-modal .modal-body {
    padding: 24px 20px 24px !important;
  }

  .ag-modal-img-box {
    height: 240px !important;
    padding: 16px !important;
  }

  .ag-modal-img-main {
    max-height: 200px !important;
  }

  .ag-modal-right {
    padding-right: 0 !important;
  }
}

@media (max-width: 600px) {
  #blockcart-modal .modal-dialog {
    width: 96% !important;
    margin: 10px auto !important;
  }

  #blockcart-modal .modal-body {
    padding: 20px 16px !important;
  }

  .ag-product-title {
    font-size: 21px !important;
  }

  .ag-price-val {
    font-size: 24px !important;
  }

  .ag-actions-row {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .ag-tabs-header {
    gap: 16px !important;
  }

  .ag-tab-btn {
    font-size: 13px !important;
  }

  .ag-trust-pill-bar {
    font-size: 11px !important;
    padding: 8px 12px !important;
  }
}
