#custom-gallery {
    font-family: Arial, sans-serif;

    .gallery {
        display: flex;
        gap: 20px;
        justify-content: center;
        align-items: flex-start;

        .image-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 372px;
            height: auto;

            .image-wrapper {
                position: relative;
                width: 100%;
                height: 100%;
                overflow: hidden;

                img {
                    width: 100%;
                    height: 100%;
                    object-fit: contain;
                    transition: transform 0.3s ease;
                    cursor: pointer;
                }

                &::after {
                    content: '';
                    position: absolute;
                    top: 0;
                    left: 0;
                    width: 100%;
                    height: 100%;
                    background-color: #1c2123;
                    opacity: 0;
                    transition: opacity 0.3s ease;
                }

                &:hover {
                    img {
                        transform: scale(1.1);
                    }

                    &::after {
                        opacity: 0.3;
                    }

                    .magnifier {
                        opacity: 1;
                        z-index: 1;
                    }
                }

                .magnifier {
                    position: absolute;
                    top: 50%;
                    left: 50%;
                    width: 30px;
                    height: 30px;
                    background: url('../img/loupe-page-produit.svg') no-repeat center;
                    background-size: 100%;
                    transform: translate(-50%, -50%);
                    opacity: 0;
                    transition: opacity 0.3s ease;
                    pointer-events: none; /* Ignore les clics sur la loupe */
                }
            }

            .discover-btn {
                margin-top: 15px;
                padding: 10px 20px;
                font: 700 14px Karla, sans-serif;
                background-color: #ffffff;
                border: 1px solid #183157;
                color: #183157;
                text-transform: uppercase;
                font-weight: bold;
                cursor: pointer;
                transition: all 0.3s ease;
                border-radius: 4px;

                &:hover {
                    background-color: #183157;
                    color: #ffffff;
                    border-color: #183157;
                }
            }
        }
    }

    /* Style de la popup */
    .popup {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.8);
        justify-content: center;
        align-items: center;
        z-index: 99;

        /* Flexbox pour aligner l'image et la croix de fermeture */
        .popup-content {
            position: relative;
            display: flex;
            justify-content: flex-start; /* Alignement à gauche pour la croix */
            align-items: center;
        }

        /* Style pour l'image dans la popup */
        img {
            max-width: 700px;
            max-height: 700px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
        }

        /* Croix de fermeture à côté de l'image */
        .close-btn {
            position: absolute;
            top: -35px;
            right: -40px;
            width: 30px;
            height: 30px;
            background: url('../img/cross-viewbox.svg') no-repeat center;
            background-size: 100%;
            cursor: pointer;
            transition: background 0.3s ease;

            /* Changer l'icône au survol */
            &:hover {
                background: url('../img/cross-viewbox-hover.svg') no-repeat center;
            }
        }
    }
}