/* ------------------- Global Styles ------------------- */
body {
    transform: translateZ(0);
}

@media (-webkit-min-device-pixel-ratio: 0) {
    .balatrocards-container .card,
    .balatrocards-container .overlay {
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
}

/* ------------------- Item Container ------------------- */
.balatrocards-container {
    position: relative;
    width: 150px;
    height: 210px;
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: transform 0.3s cubic-bezier(0.7, -3, 0.3, 3);
    padding: 0.5lh;
    
    z-index: 50; /* Puedes agregar estilos personalizados aquí */
}

.balatrocards-container:hover {
    transform: scale3d(1.3, 1.3, 1.3);
    z-index: 999;
}

/* ------------------- Common Child Elements ------------------- */
.balatrocards-container .card,
.balatrocards-container .overlay,
.balatrocards-container .shadow {
    backface-visibility: hidden;
    will-change: transform;
}

/* ------------------- Card Styles ------------------- */
.balatrocards-container .card {
    width: 150px;
    height: 210px;
    /* Puedes configurar la imagen base con un data attribute en cada contenedor */
    background-color: rgb(217, 227, 255);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    border-radius: 20px;
    position: absolute;
    top: 0;
    left: 0;
    transform: translateZ(10px);
    overflow: hidden;
    image-rendering: pixelated;
    transition: background-image 0.2s ease;
}

.balatrocards-container:hover .card {
    /* Puedes configurar la imagen hover vía data attribute y actualizar la lógica JS para leerla */
    background-position: center;
}

/* ------------------- Shadow Styles ------------------- */
.balatrocards-container .shadow {
    width: 150px;
    height: 210px;
    background-color: rgba(0, 0, 0, 0.308);
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.644);
    border-radius: 20px;
    position: absolute;
    top: 10pt;
    left: 0;
    z-index: -1;
    transform: translateZ(-10px);
}

/* ------------------- Overlay Styles ------------------- */
.balatrocards-container .overlay {
    pointer-events: none;
    width: 150%;
    height: 150%;
    /* Puedes configurar la imagen overlay con un data attribute en cada contenedor */
    background-repeat: no-repeat;
    background-size: 90%;
    background-position: center;
    image-rendering: pixelated;
    position: absolute;
    top: -25%;
    left: -25%;
    opacity: 0;
    transition: opacity 0.3s ease;
    transform: translate(-50%, -50%) translateZ(20px);
    z-index: 2;
}

.balatrocards-container:hover .overlay {
    opacity: 1;
}