

.product-detail {
    display: flex;
    justify-content: space-between;
    align-items: stretch; /* Ensures both containers have the same height */
    flex-wrap: nowrap;
    gap: 1.25%;
    padding: 1.25%;
    margin-left: 2.5%;
    margin-right: 2.5%;
    height: 25em; /* Set a fixed height, or use a relative value if needed */
}

.image-container {
    position: relative;
    flex: 0 0 85%; /* Image container takes 85% of the width */
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    gap: 1.25%;
    height: 100%;
}

.image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
}

.image-wrapper img {
    max-width: 100%;
    height: 100%; /* Ensure image scales with the container height */
    object-fit: contain;
    border-radius: 0.625em;
    transition: transform 0.3s ease-in-out;
}

/* Navigation buttons */
.nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 1em;
    border: none;
    padding: 0.5em;
    cursor: pointer;
    z-index: 2;
}

#prevBtn {
    right: 1em;  /* ar */
}

#nextBtn {
    left: 1em;  /* ar */
}

/* Decrease the size of the arrows and remove unnecessary padding or margins */
.nav-button {
    width: 2.5em;
    height: 2.5em;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Add a slight margin to the arrow buttons so that they don't take too much space */
#prevBtn, #nextBtn {
    margin: 0 2%;
}

/* Optional: You can add a little hover effect to make the arrows stand out more */
.nav-button:hover {
    background: rgba(0, 0, 0, 0.7);
}

.thumbnail-container {
    flex: 0 0 15%; /* Thumbnails container takes 15% of width */
    max-width: 15%;
    display: flex;
    flex-direction: column;
    gap: 1.25em;
    justify-content: flex-start;
    overflow-y: auto;
    height: 100%; /* Make sure thumbnail container matches image container height */
}

.thumbnail-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.25em;
    max-height: 100%;
    overflow-y: auto;
    transition: flex-direction 0.3s ease;
}

.thumbnail {
    width: 100%;
    max-width: 100%;
    cursor: pointer;
    border-radius: 0.625em;
    transition: transform 0.3s ease;
    object-fit: cover;
}

.thumbnail:hover {
    transform: scale(0.97);
}

@media screen and (max-width: 768px) {
    .product-detail {
        flex-direction: column;
        align-items: center;
        height: auto; /* Remove fixed height on smaller screens */
    }

    .image-container {
        flex: 0 0 100%;
        max-width: 100%;
        height: 50vh; /* Set height to 50% of viewport height */
    }

    .thumbnail-container {
        flex: 0 0 100%;
        max-width: 100%;
        display: flex;
        justify-content: center;
        gap: 1.25em;
        overflow-x: auto; /* Allow horizontal scrolling for thumbnails */
        margin-top: 1em;
    }

    .thumbnail-wrapper {
        flex-direction: row;
        overflow-x: auto;
        max-height: 100px;
    }

    .thumbnail {
        width: 15vw; /* Reduce thumbnail size for mobile */
        height: auto;
    }
}

/* Full-screen modal styles */
.full-screen-modal {
    display: none;
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.full-screen-modal img {
    max-width: 90%;
    max-height: 90%;
    margin: 2.5% auto;
    object-fit: contain;
}

.close-btn {
    position: absolute;
    top: 2.5%;
    right: 2.5%;
    color: white;
    font-size: 2.5em;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover {
    color: red;
}