
@keyframes backgroundColorPalette {
	0% {
		background: #ff1100;
	}
	25% {
		background: #da00ff;
	}
	50% {
		background: #00fff4
	}
	75% {
		background: #FF9800;
	}
	100% {
		background: #F44336;
	}
	
}

#cover-flip-container {
  display: grid;
  width: 100%;
  overflow: visible !important;
  position: relative;
  z-index: 100;
  grid-gap: 25px;
  padding: 10px;
  background: transparent;
}

/* mobile default: 2 colonne x 4 righe (<=480px) */
@media (max-width: 480px) {
  #cover-flip-container { 
	  grid-template-columns: repeat(2, 1fr);
	  grid-auto-rows: 1fr;
	  grid-gap: 10px;
  }
}

/* tablet: 3x4 (481-900) -> 4 colonne (cols) */
@media (min-width: 481px) and (max-width: 900px) {
  #cover-flip-container { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 1fr; grid-gap: 15px; }
}

/* desktop: 3x6 (>=901) -> 6 colonne */
@media (min-width: 901px) {
  #cover-flip-container { grid-template-columns: repeat(6, 1fr); grid-auto-rows: 1fr; grid-gap: 25px; }
}

/* il resto del tuo CSS esistente per .cover-flip-item e faces rimane identico */


.cover-flip-item {
  position: relative;
  aspect-ratio: 1 / 1;
  perspective: 1500px;
  transform-style: preserve-3d;
  transform-origin: center center;
  transition: transform 0.6s ease-in-out;
  overflow: visible !important;
  z-index: 1;
}

.cover-flip-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  background-size: cover;
  background-position: center;
}

.cover-flip-front { transform: rotateY(0deg); }
.cover-flip-back { transform: rotateY(90deg); }

.cover-flip-face::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.6s cubic-bezier(0.89, -0.02, 1, 1);
}

.cover-flip-item.flipping .cover-flip-face::after {
  background: rgb(0 0 0 / 74%);
}

.cover-flip-item.flipping {
  z-index: 10000 !important;
  transform: rotateY(90deg);
}
