/* =========================================================
   🎁 RESINPRO CART PROMOTIONS - MODAL EXCLUSIVE STYLES
   File: assets/css/rp-modal-promo.css
   ========================================================= */

.rp-promo-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

/* 🌟 Container Principale Evidenziato */
.rp-promo-panel.rp-promo-highlighted {
    position: relative;
    border-radius: 20px;
    border: 2px solid #ffbd00;
    background-clip: padding-box;
    padding: 18px 20px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    animation: rpBadgePulse 3s infinite ease-in-out;
}

/* Bordo Gradiente Animato Luminoso */
.rp-promo-panel.rp-promo-highlighted::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 22px;
  z-index: -1;
  opacity: 0.85;
}

.rp-promo-panel.rp-promo-highlighted:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(16, 185, 129, 0.14), 0 6px 20px rgba(0, 32, 73, 0.09);
}

/* Header Promozione */
.rp-promo-header {
  margin-bottom: 14px;
}

.rp-promo-badge-glow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(90deg, #002049 0%, #1a7949 100%);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(26, 121, 73, 0.28);
  animation: rpBadgePulse 3s infinite ease-in-out;
}

@keyframes rpBadgePulse {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(26, 121, 73, 0.28);
  }
  50% {
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.45);
  }
}

.rp-promo-badge-icon {
  font-size: 14px;
}

.rp-promo-desc {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: #4b5563;
  font-weight: 500;
}

/* Lista Prodotti Promo */
.rp-promo-products-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Card Singola Prodotto Offerta */
.rp-promo-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.25s ease;
  position: relative;
}

.rp-promo-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
}

.rp-promo-card-in-cart {
  background: #f8fafc;
  border-color: #e2e8f0;
  opacity: 0.9;
}

/* Thumbnail Wrap & Badge Sconto */
.rp-promo-card-thumb-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rp-promo-card-thumb {
  display: block;
  width: 100%;
  height: 100%;
}

.rp-promo-card-thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  transition: transform 0.3s ease;
}

.rp-promo-card:hover .rp-promo-card-thumb img {
  transform: scale(1.05);
}

.rp-promo-discount-tag {
  position: absolute;
  top: 4px;
  left: 4px;
  background: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
  letter-spacing: 0.02em;
}

/* Dettagli Prodotto */
.rp-promo-card-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.rp-promo-card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.rp-promo-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  text-decoration: none;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.rp-promo-card-title:hover {
  color: #1a7949;
}

.rp-promo-limit-pill {
  font-size: 10px;
  font-weight: 700;
  background: #f1f5f9;
  color: #64748b;
  padding: 3px 6px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
}

/* Box Prezzi */
.rp-promo-price-box {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.rp-promo-price-regular {
  font-size: 13px;
  color: #94a3b8;
  text-decoration: line-through;
  font-weight: 500;
}

.rp-promo-price-special {
  font-size: 17px;
  font-weight: 800;
  color: #16a34a;
}

/* Selettore Varianti */
.rp-promo-variation-box {
  margin-top: 2px;
}

.rp-promo-variation-select {
  width: 100%;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 12px;
  color: #334155;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.rp-promo-variation-select:focus {
  outline: none;
  border-color: #1a7949;
}

/* Pulsanti Azione */
.rp-promo-card-action {
  margin-top: 4px;
}

.rp-promo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.rp-promo-add-btn {
  background: linear-gradient(90deg, #002049 0%, #1a7949 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 32, 73, 0.15);
}

.rp-promo-add-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 6px 16px rgba(26, 121, 73, 0.28);
}

.rp-promo-add-btn:active {
  transform: translateY(0);
}

.rp-promo-btn-added {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
  cursor: default !important;
}

.rp-promo-btn.loading {
  opacity: 0.75;
  pointer-events: none;
}

/* Pulsante "Vedi tutti i prodotti scontati" */
.rp-promo-view-all-wrap {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(26, 121, 73, 0.25);
}

.rp-promo-view-all-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  border-radius: 12px;
  background: #ffffff;
  border: 2px solid #002049;
  color: #002049;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 32, 73, 0.08);
}

.rp-promo-view-all-btn:hover {
  background: linear-gradient(90deg, #002049 0%, #1a7949 100%);
  border-color: transparent;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(26, 121, 73, 0.25);
}

.rp-promo-view-all-arrow {
  transition: transform 0.25s ease;
}

.rp-promo-view-all-btn:hover .rp-promo-view-all-arrow {
  transform: translateX(4px);
}

/* =========================================================
   🪟 SECONDO MODAL: TUTTI I PRODOTTI SCONTATI
   ========================================================= */

.rp-all-promos-modal-Overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100050;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.rp-all-promos-modal-Overlay.is-open {
  display: flex;
  opacity: 1;
}

.rp-all-promos-dialog {
  background: #f8fafc;
  width: 100%;
  max-width: 880px;
  max-height: 88vh;
  border-radius: 22px;
  border: 2px solid #ffbd00;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: rpModalSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes rpModalSlideUp {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.rp-all-promos-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  background: linear-gradient(90deg, #002049 0%, #1a7949 100%);
  color: #ffffff;
}

.rp-all-promos-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #ffffff !important;
  line-height: 1.3;
}

.rp-all-promos-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.88);
}

.rp-all-promos-close-x {
  background: rgba(255, 255, 255, 0.16);
  border: none;
  color: #ffffff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rp-all-promos-close-x:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.06);
}

.rp-all-promos-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rp-all-promos-group-head {
  margin-bottom: 12px;
}

.rp-all-promos-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.rp-all-promos-footer {
  padding: 14px 24px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
}

.rp-all-promos-close-btn {
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
  color: #1e293b;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rp-all-promos-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Responsive Mobile */
@media (max-width: 720px) {
  .rp-all-promos-grid {
    grid-template-columns: 1fr;
  }
  .rp-all-promos-modal-Overlay {
    padding: 12px;
  }
  .rp-all-promos-header {
    padding: 14px 16px;
  }
  .rp-all-promos-body {
    padding: 14px 16px;
  }
  .rp-all-promos-footer {
    padding: 12px 16px;
  }
  .rp-all-promos-close-btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .rp-promo-card {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }
  .rp-promo-card-thumb-wrap {
    width: 76px;
    height: 76px;
  }
  .rp-promo-price-special {
    font-size: 15px;
  }
  .rp-promo-btn {
    padding: 7px 10px;
    font-size: 12px;
  }
}
