/* 1. WRAPPER: Sets the 3D perspective and flex sizing */
.simple-lp-wrapper {
    max-width: 350px;
    min-width: 200px;
    margin: 0;
    flex: 1;
    perspective: 1000px; /* Required for the 3D effect */
    background-color: transparent;
    height: 100%;
}

/* 2. INNER CONTAINER: Uses Grid to stack the faces without collapsing */
.simple-lp-inner {
    display: grid;
    grid-template-rows: 1fr;
    width: 100%;
    height: 100%;
    text-decoration: none;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}



/* 3. HOVER TRIGGER: Flips the card 180 degrees */
.simple-lp-wrapper:hover .simple-lp-inner {
    transform: rotateY(180deg);
}

/* 4. SHARED FACE STYLES: Stacked in the exact same grid space */
.simple-lp-front, 
.simple-lp-back {
    grid-area: 1 / 1;
    position: relative;
    height: 100%;
    box-sizing: border-box;
    backface-visibility: hidden; 
    -webkit-backface-visibility: hidden; 
    -moz-backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border: 1px solid #d3d3d3;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    background-color: #ffffff; 
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 5. FRONT SIDE STYLES */
.simple-lp-front {
    align-items: center;
    justify-content: flex-start; 
    z-index: 2; 
    transform: rotateY(0deg);
    padding-bottom: 12px; /* Gives the text some breathing room at the bottom */
}
/* Image styling with flex-shrink prevention */
.simple-lp-cover {
    width: 100%;
    max-width: 100%; /* Strictly prevents horizontal overflow */
    height: auto; /* Removes the rigid 180px limit */
    aspect-ratio: 1 / 1; /* Forces the image to ALWAYS be a perfect square */
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0; /* Margin removed to let the title handle spacing */
    display: block;
}

.simple-lp-title {
    color: #000;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 8px 0 8px;
    margin: auto 0;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* Optional: if you added the artist to the front */
.simple-lp-artist {
    color: #666;
    font-size: 0.85rem;
    text-align: center;
    padding: 0 6px 8px 6px;
    width: 100%;
}

/* 6. BACK SIDE STYLES */
.simple-lp-back {
    transform: rotateY(180deg); /* Starts flipped backwards */
    padding: 20px 15px;
    box-sizing: border-box;
    text-align: center;
    justify-content: space-between;
    color: #000;
}

.back-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 4px;
}

.back-artist {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
}

.back-details {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: #f8f9fa;
    padding: 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.back-bottom {
    font-size: 1.1rem;
    font-weight: bold;
    margin-top: auto;
}

/* 7. UNAVAILABLE OVERLAY STYLES */
.unavailable-overlay .simple-lp-front::after {
    content: "NEM ELÉRHETŐ";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
    text-align: center;
    pointer-events: none;
    z-index: 2;
}

.unavailable-overlay .simple-lp-cover {
    opacity: 0.7;
    filter: grayscale(80%) sepia(20%) hue-rotate(180deg) blur(1px);
    transition: all 0.3s ease;
}

.unavailable-overlay:hover .simple-lp-cover {
    filter: none;
    opacity: 1;
}

@media (max-width: 768px) {
    /* 1. Disable the 3D perspective on the wrapper */
    .simple-lp-wrapper {
        perspective: none;
    }

    /* 2. Prevent the flip rotation on hover */
    .simple-lp-wrapper:hover .simple-lp-inner {
        transform: none !important;
    }

    /* 3. Hide the back side entirely */
    .simple-lp-back {
        display: none !important;
    }

    /* 4. Ensure the inner container stays flat */
    .simple-lp-inner {
        transform-style: flat;
        transform: none !important;
    }

    /* 5. Ensure the front side is visible and not rotated */
    .simple-lp-front {
        transform: none !important;
        position: relative; /* Takes it out of the grid-stacking context if needed */
    }
}