/* ── Product Card Widget – Elementor ── */

.epc-card {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  background: #ffffff;
  border-radius: 12px;
  padding: 24px 20px 20px;
  overflow: visible;
}

/* Link wrapper che copre tutta la card */
.epc-card-link {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  display: block;
}

/* Quando la card è cliccabile, i link interni stanno sopra */
.epc-card.has-card-link .epc-info a.epc-link {
  position: relative;
  z-index: 4;
}

.epc-shadow {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* Wrapper immagine per gestire gli effetti hover */
.epc-image-wrap {
  width: 100%;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* Immagine principale */
.epc-main-image {
  width: 100%;
  display: block;
  object-fit: contain;
  max-height: 360px;
  position: relative;
  transition: transform 0.35s ease, opacity 0.35s ease, filter 0.35s ease;
  transform-origin: center center;
}

/* ── Effetti hover immagine ── */

/* Zoom */
.epc-hover-zoom .epc-image-wrap:hover .epc-main-image {
  transform: scale(1.08);
}

/* Bounce (keyframe) */
@keyframes epc-bounce {
  0%   { transform: translateY(0); }
  30%  { transform: translateY(-12px); }
  55%  { transform: translateY(0); }
  75%  { transform: translateY(-6px); }
  90%  { transform: translateY(0); }
  100% { transform: translateY(0); }
}
.epc-hover-bounce .epc-image-wrap:hover .epc-main-image {
  animation: epc-bounce 0.65s ease both;
  transition: none;
}

/* Lift (sale + ombra) */
.epc-hover-lift .epc-image-wrap:hover .epc-main-image {
  transform: translateY(-10px);
  filter: drop-shadow(0 12px 20px rgba(0,0,0,0.18));
}

/* Fade */
.epc-hover-fade .epc-image-wrap:hover .epc-main-image {
  opacity: 0.6;
}

/* Swing (keyframe) */
@keyframes epc-swing {
  0%   { transform: rotate(0deg); }
  20%  { transform: rotate(6deg); }
  40%  { transform: rotate(-5deg); }
  60%  { transform: rotate(4deg); }
  80%  { transform: rotate(-3deg); }
  100% { transform: rotate(0deg); }
}
.epc-hover-swing .epc-image-wrap:hover .epc-main-image {
  animation: epc-swing 0.6s ease both;
  transform-origin: top center;
  transition: none;
}

/* Nessun effetto */
.epc-hover-none .epc-image-wrap .epc-main-image {
  transition: none;
}

/* Badge / bollino overlay */
.epc-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 80px;
  height: 80px;
  object-fit: contain;
  z-index: 2;
  pointer-events: none;
}

/* Area testo */
.epc-info {
  margin-top: 16px;
  text-align: center;
  width: 100%;
}

/* Titolo */
.epc-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.25;
  margin-bottom: 8px;
}

/* Link */
.epc-link {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #8B1A1A;
  text-decoration: none;
  margin-top: 4px;
  transition: color 0.2s ease, opacity 0.2s ease;
  line-height: 1.5;
}

.epc-link:hover {
  opacity: 0.7;
  text-decoration: underline;
}
