/* ===== Grid: 4 desktop / 2 mobile ===== */
.rfp-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
@media (max-width: 900px) {
  .rfp-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0px;
  }
}

/* ===== Figure / Image ===== */
.rfp-figure {
  position: relative;
  padding: 16px 16px 0;
  overflow: visible;
}
@media (max-width: 900px) {
  .rfp-figure {
    padding: 8px 8px 0;
  }
}
.rfp-image-wrap {
  position: relative;
  z-index: 2;
  aspect-ratio: 4 / 4;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
/* Mobile: piÃ¹ spazio verticale per bottiglia */
@media (max-width: 900px) {
  .rfp-image-wrap {
    aspect-ratio: 3 / 4;
    padding-top: 20px;
  }
}
.rfp-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: filter 0.25s ease;
}

/* Hover desktop: leggero blur (opzionale) */
@media (hover: hover) and (pointer: fine) {
  .rfp-card:hover .rfp-thumb {
    filter: blur(2px);
  }
}

/* ===== SALE in alto a destra ===== */
.rfp-figure .onsale {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  pointer-events: none;
}
.rfp-figure .onsale img {
  display: block;
  width: 58px;
  height: auto;
}

/* ===== BADGE SCONTO CAVEAU (-30%) ===== */
.caveau-discount-badge {
  position: absolute;
  top: 0px;
  left: 8px;
  z-index: 5;
  background: linear-gradient(135deg, #7A1A55 0%, #a52a6f 100%);
  color: #fff;
  font-family: 'Jost-500-Medium', sans-serif;
  font-weight: 500;
  font-size: 18px;
  line-height: 1.2;
  padding: 8px 12px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(122, 26, 85, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
  min-width: 60px;
}

.caveau-discount-badge small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  opacity: 0.9;
  margin-top: 2px;
  letter-spacing: 0.5px;
}

@media (max-width: 900px) {
  .caveau-discount-badge {
    font-size: 14px;
    padding: 6px 10px;
    min-width: 50px;
    top: 50px;
  }
  .caveau-discount-badge small {
    font-size: 8px;
  }
}

/* ===== Pannello sabbia responsive (niente height fissa) =====
   Riduciamo la sovrapposizione su desktop per limitare lo "spazio bianco".
*/
.rfp-card {
  --lift: clamp(28px, 22%, 72px);
  height: 100%;
}
.rfp-body {
  height: 60%;
} /* desktop: overlap piÃ¹ contenuto */
@media (max-width: 900px) {
  .rfp-card {
    --lift: clamp(16px, 18%, 50px);
  }
} /* mobile: meno overlap = piÃ¹ spazio */

.rfp-panel {
  background: #f4f1ec;
  border-radius: 10px;
  margin: calc(var(--lift) * -1) 14px 16px;
  padding: calc(var(--lift) + 14px) 18px 18px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  row-gap: 6px;
  height: 100%;
}
@media (max-width: 900px) {
  .rfp-panel {
    margin: calc(var(--lift) * -1) 8px 8px;
    padding: calc(var(--lift) + 50px) 12px 12px;
    row-gap: 4px;
    justify-content: space-around;
  }
}

/* ===== Testi / Prezzo ===== */
.rfp-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
  color: #7a1a55;
  text-transform: uppercase;
  text-align: center;
}
@media (max-width: 900px) {
  .rfp-title {
    font-size: 14px;
    line-height: 1.2;
  }
}
.rfp-cantina {
  font-size: 16px;
  font-style: italic;
  opacity: 0.9;
  text-align: center;
}
@media (max-width: 900px) {
  .rfp-cantina {
    font-size: 12px;
  }
}
.rfp-qty {
  font-size: 12px;
  opacity: 0.7;
}
.rfp-price {
  font-weight: 400;
  font-family: "Jost-500-Medium";
  font-size: 20px;
  color: #11a747;
}
.rfp-price del {
  opacity: 1;
  margin-right: 8px;
  color: #c62828;
  font-size: 16px;
  text-decoration: line-through;
}
.rfp-price ins {
  text-decoration: none;
  color: #11a747;
  font-weight: 500;
  font-size: 22px;
}
@media (max-width: 900px) {
  .rfp-price del {
    font-size: 14px;
  }
  .rfp-price ins {
    font-size: 18px;
  }
}
.rfp-description {
  font-size: 13px;
  text-align: center;
}
.rfp-meta-details {
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 15px;
}

/* ===== Overlay icona carrello (solo desktop) ===== */
.rfp-overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 4;
}
@media (hover: hover) and (pointer: fine) {
  .rfp-card:hover .rfp-overlay {
    display: flex;
  }
}

/* === Icona carrello (presa dal tuo CSS) === */
.icon-cart {
  display: flex !important;
  margin: 0 !important;
  background-color: #7a1b54 !important;
  width: 31px !important;
  padding: 30px !important;
  background-position: center !important;
  border-radius: 50px !important;
  background-repeat: no-repeat !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='29' viewBox='0 0 28 29' fill='none'%3E%3Cpath d='M8.33325 19.6666H18.0175C24.001 19.6666 24.911 15.9077 26.0146 10.4254C26.333 8.8441 26.4922 8.05346 26.1094 7.5267C25.8045 7.10714 25.2769 7.02177 24.3333 7.00439' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M9.66675 6.99984H20.3334M15.0001 12.3332V1.6665' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M8.33333 19.6667L4.83831 3.01991C4.54153 1.83279 3.47491 1 2.25127 1H1' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M9.50675 19.6665H8.95817C7.14037 19.6665 5.66675 21.2016 5.66675 23.095C5.66675 23.4106 5.91235 23.6665 6.21532 23.6665H21.0001' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M11.6667 27.6665C12.7713 27.6665 13.6667 26.7711 13.6667 25.6665C13.6667 24.5619 12.7713 23.6665 11.6667 23.6665C10.5622 23.6665 9.66675 24.5619 9.66675 25.6665C9.66675 26.7711 10.5622 27.6665 11.6667 27.6665Z' stroke='white' stroke-width='2'/%3E%3Cpath d='M21 27.6665C22.1046 27.6665 23 26.7711 23 25.6665C23 24.5619 22.1046 23.6665 21 23.6665C19.8954 23.6665 19 24.5619 19 25.6665C19 26.7711 19.8954 27.6665 21 27.6665Z' stroke='white' stroke-width='2'/%3E%3C/svg%3E") !important;
  flex-grow: 0 !important;
  border: 2px solid #7a1b54;
}
.icon-cart:hover {
  background-color: #fff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='29' viewBox='0 0 28 29' fill='none'%3E%3Cpath d='M8.33325 19.6666H18.0175C24.001 19.6666 24.911 15.9077 26.0146 10.4254C26.333 8.8441 26.4922 8.05346 26.1094 7.5267C25.8045 7.10714 25.2769 7.02177 24.3333 7.00439' stroke='%237A1B54' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M9.66675 6.99984H20.3334M15.0001 12.3332V1.6665' stroke='%237A1B54' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M8.33333 19.6667L4.83831 3.01991C4.54153 1.83279 3.47491 1 2.25127 1H1' stroke='%237A1B54' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M9.50675 19.6665H8.95817C7.14037 19.6665 5.66675 21.2016 5.66675 23.095C5.66675 23.4106 5.91235 23.6665 6.21532 23.6665H21.0001' stroke='%237A1B54' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M11.6667 27.6665C12.7713 27.6665 13.6667 26.7711 13.6667 25.6665C13.6667 24.5619 12.7713 23.6665 11.6667 23.6665C10.5622 23.6665 9.66675 24.5619 9.66675 25.6665C9.66675 26.7711 10.5622 27.6665 11.6667 27.6665Z' stroke='%237A1B54' stroke-width='2'/%3E%3Cpath d='M21 27.6665C22.1046 27.6665 23 26.7711 23 25.6665C23 24.5619 22.1046 23.6665 21 23.6665C19.8954 23.6665 19 24.5619 19 25.6665C19 26.7711 19.8954 27.6665 21 27.6665Z' stroke='%237A1B54' stroke-width='2'/%3E%3C/svg%3E") !important;
}
/* niente pseudo ::after */
.icon-cart::after {
  content: none !important;
}

/* ===== CTA Mobile (testo) ===== */
.rfp-cart-cta-mobile {
  display: none;
  padding: 15px 30px;
  border: 2px solid #7a1b54;
  color: #000;
  font-size: 14px;
  border-radius: 5px;
  transition: 0.3s;
  font-family: "Jost-500-Medium", system-ui, sans-serif;
  font-weight: 500;
  margin-top: 1rem;
  text-decoration: none;
  text-align: center;
}
.rfp-cart-cta-mobile:hover {
  background: #7a1b54;
  color: #fff;
}

/* Mostra SOLO su tablet/mobile */
@media (max-width: 900px) {
  .rfp-cart-cta-mobile {
    display: inline-block;
    padding: 10px;
  }
  .rfp-price {
    display: flex;
    flex-direction: column;
  }
}
/* Nascondi su desktop con forza */
@media (min-width: 901px) {
  .rfp-cart-cta-mobile {
    display: none !important;
  }
}

/* ===== QuantitÃ  dinamica (Red Friday) ===== */
:root {
  /* palette base â€“ adattabile ai tuoi colori */
  --rfp-clr-bg: #f4f1ec; /* sabbia del tuo pannello */
  --rfp-clr-text: #141d32; /* primario sito */
  --rfp-clr-accent: #8dbfe0; /* accent sito */
  --rfp-clr-ok: #2e7d32; /* verde */
  --rfp-clr-limited: #f9a825; /* giallo/ambra */
  --rfp-clr-few: #ef6c00; /* arancio */
  --rfp-clr-last: #c62828; /* rosso */
  --rfp-clr-out: #6b7280; /* grigio */
  --rfp-max-qty: 4; /* cap Red Friday */
}

.rfp-qty {
  display: grid;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.35rem;
}

.rfp-qty-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 600;
  color: #ffffff;
  background: #fff;
  border: 1px solid rgba(20, 29, 50, 0.12);
  /* border-radius: 999px; */
  padding: 0.25rem 0.6rem;
  width: max-content;
}

/* micro progress bar (0..4 => 0..100%) */
.rfp-qty-bar {
  position: relative;
  display: block;
  height: 4px;
  width: 100%;
  background: rgba(20, 29, 50, 0.08);
  border-radius: 999px;
  overflow: hidden;
}
.rfp-qty-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: calc(var(--rfp-progress, 0) * (100% / var(--rfp-max-qty)));
  background: currentColor;
  border-radius: inherit;
  transition: width 0.35s ease;
}

/* Stati colore + effetti */
.rfp-qty.stock-ok {
  color: var(--rfp-clr-ok);
}
.rfp-qty.stock-limited {
  color: var(--rfp-clr-limited);
}
.rfp-qty.stock-few {
  color: var(--rfp-clr-few);
}
.rfp-qty.stock-last {
  color: var(--rfp-clr-last);
}
.rfp-qty.stock-out {
  color: var(--rfp-clr-out);
}

.rfp-qty.stock-last .rfp-qty-badge {
  animation: rfp-pulse 1.2s ease-in-out infinite;
  border-color: currentColor;
  position: absolute;
  top: -10px;
  right: -10px;
  z-index: 10;
}
.rfp-qty.stock-few .rfp-qty-badge,
.rfp-qty.stock-limited .rfp-qty-badge {
  border-color: currentColor;
}

/* badge icona opzionale */
.rfp-qty-badge::before {
  content: "\25CF";
  font-size: 0.65em;
}

/* piccolo pulse solo per â€œUltimo pezzoâ€ */
@keyframes rfp-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(198, 40, 40, 0);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(198, 40, 40, 0.15);
  }
}

/* tema scuro/sfondi sabbia: mantieni contrasto */
.rfp-panel .rfp-qty-badge {
  background: #ff0000;
}

@media (max-width: 480px) {
  .rfp-qty.stock-last .rfp-qty-badge {
    right: 0;
    top: 14%;
    left: 25%;
  }
}
.rfp-out-badge{
	display:none;
}



@media (max-width: 420px) {
    .rfp-panel {
        margin: calc(var(--lift) * -1) 9px 110px;
        padding: calc(var(--lift) + 50px) 12px 12px;
        row-gap: 4px;
        justify-content: space-around;
    }
}