.photo-albums .album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.album {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.album:hover {
    transform: scale(0.98);
}

.album .thumbnail {
    aspect-ratio: 3/2;
    background-size: cover;
    background-position: center;
    border-radius: 10px 10px 0 0;
    width: 100%;
}

.album-title {
    padding: 15px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
}


.photo-albums {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    width: 100%;
}

.photo-albums .album {
    flex: 1 1 300px;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: .5s;
    padding: 10px;
}

.album:hover {
    scale: .95;
}

.album .thumbnail {
    width: 100%;
    background-position: top;
    background-repeat: no-repeat;
    background-size: auto 100%; /* Zorgt ervoor dat de afbeelding niet wordt vergroot, maar wel volledig zichtbaar is */
    border-radius: 10px;
    aspect-ratio: 3 / 2;
}

/* single photobook page */

.album-main-container {
    display: flex;
    gap: 30px;
    align-items: stretch;
}

.gallery {
    flex: 1;
    min-width: 0;
}

.gallery-main-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.selected-photo-view {
    width: 100%;
    min-height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
}

.selected-photo-view img {
    display: block;
    max-width: 100%;
    max-height: 75vh;
    width: auto;
    height: auto;
    object-fit: contain;
    position: static;
    transform: none;
    cursor: default;
}

.selected-photo-view img:hover {
    scale: 1;
    transform: none;
}

.gallery-controls {
    width: auto;
    height: auto !important;
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    position: relative;
    z-index: 2;
}

.gallery-controls button {
    background-color: var(--primary-color);
    height: 40px;
    width: 40px;
    border-radius: 50%;
    color: white;
    border: none;
    outline: none;
}

.thumbnail-container {
    width: 130px;
    max-height: 600px;
    overflow-y: auto;
}

.thumbnail-gallery {
    padding: 10px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.thumbnail-img,
.thumbnail-gallery img {
    width: 90px;
    height: 70px;
    object-fit: cover;
    cursor: pointer;
    padding: 2px;
}

.thumbnail-img.selected,
.thumbnail-container img.selected {
    border: 3px solid var(--primary-color);
}

@media (max-width: 768px) {
    .album-main-container {
        flex-direction: column;
        height: auto;
    }

    .gallery {
        padding: 0 !important;
    }

    .selected-photo-view {
        min-height: auto;
        width: 100%;
    }

    .selected-photo-view img {
        width: 100%;
        max-width: 100%;
        max-height: none;
        height: auto;
    }

    .gallery-controls {
        margin: 20px 0;
    }

    .thumbnail-container {
        width: 100%;
        max-height: none;
        height: auto;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .thumbnail-gallery {
        flex-direction: row !important;
        padding: 10px !important;
        gap: 10px;
        align-items: center;
    }

    .thumbnail-img,
    .thumbnail-gallery img {
        width: 90px !important;
        height: 70px !important;
        flex: 0 0 auto;
        object-fit: cover;
    }
}