.container-3d {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f5f5f5;
    gap: 15px; /* CAMBIAR PARA ESPACIADO ENTRE PRODUCTOS */
    flex-wrap: wrap;
    padding: 15px; /* CAMBIAR PARA MÁRGENES EXTERNOS */
}

/* CONTENEDOR PRINCIPAL - AJUSTAR ESTOS VALORES PARA CAMBIAR TAMAÑO */
.image-3d-container {
    perspective: 1000px; /* Puede reducirse proporcionalmente */
    display: inline-block;
    position: relative;
    width: 200px; /* VALOR PRINCIPAL A CAMBIAR - ANCHO */
    height: 200px; /* VALOR PRINCIPAL A CAMBIAR - ALTO */
    overflow: hidden;
    margin: 8px; /* CAMBIAR PARA SEPARACIÓN ENTRE ELEMENTOS */
}

.front-3d-wrapper {
    position: absolute;
    width: 100%; /* Se mantiene en 100% del contenedor */
    height: 100%; /* Se mantiene en 100% del contenedor */
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-style: preserve-3d;
    z-index: 1;
}

.front-image {
    width: 100%; /* Relativo al contenedor */
    height: 100%; /* Relativo al contenedor */
    object-fit: contain;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); /* Sombra más sutil para tamaño pequeño */
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backface-visibility: hidden;
    background-color: transparent;
}

/* Imagen secundaria - porcentajes relativos al contenedor */
.back-image {
    width: 90%; /* 90% del contenedor principal */
    height: 90%; /* 90% del contenedor principal */
    object-fit: contain;
    position: absolute;
    left: 5%; /* (100% - 90%) / 2 = 5% para centrar */
    bottom: 0;
    opacity: 0;
    transform: translateY(30%) scale(0.4);
    filter: brightness(1.1) contrast(1.1);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 2;
    background-color: transparent;
}

/* Efectos hover - mismos que original pero proporcionales */
.image-3d-container:hover .front-3d-wrapper {
    transform: rotateX(15deg);
}

.image-3d-container:hover .front-image {
    opacity: 0.5;
    transform: rotateX(25deg) scale(0.9);
    filter: blur(1px) brightness(0.8);
}

.image-3d-container:hover .back-image {
    opacity: 1;
    transform: translateY(-5%) scale(0.9);
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3)) brightness(1.1) contrast(1.1);
}

