.textiles {
    width: 80%;
    margin: auto;
    margin-top: 188px;
}

.title {
    font-size: 24px;
    font-weight: normal;
    color: #495057;
    margin-left: 6px;
    margin-bottom: 24px;
}

.sub-section {
    margin-bottom: 128px;
}

.row {
    display: -ms-flexbox; /* IE10 */
    display: flex;
    -ms-flex-wrap: wrap; /* IE10 */
    flex-wrap: wrap;
    padding: 0 4px;
}

/* Create four equal columns that sits next to each other */
.column {
    -ms-flex: 20%; /* IE10 */
    flex: 20%;
    max-width: 20%;
    padding: 0 4px;
}

.column img {
    margin-top: 8px;
    vertical-align: middle;
    width: 100%;
}

.textile-img {
    width: 100%;
    height: auto;
}

.image-container {
    width: 800px;
    /* height: 800px; */
    margin: auto;
}

.image-overlay {
    position: absolute;
    width: 100vw;
    height: 100%;
    top: 0;
    left: 0;
    /* background: #212529; */
    /* box-shadow: 0 20px 20px rgba(0, 0, 0, 0.1); */
    /* border-radius: 4px; */
    z-index: 2 !important;
    visibility: hidden;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

#image-description-container {
    padding: 0 12px;
}

#image-description {
    font-size: 18px;
    color: white;
}

#selected-img {
    max-width: 90%;
    max-height: 90%;
}

.image-grid {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 6px;
}

.image-grid::after {
    content: "";
    display: block;
    flex-grow: 10;
}

.image-grid li {
    height: 33vh;
    flex-grow: 1;
}

/* .image-grid li:last-child {
    flex-grow: 10;
} */

.image-grid img {
    max-height: 100%;
    min-width: 100%;
    object-fit: cover;
    vertical-align: bottom;
    cursor: pointer;
    transition: margin 0.1s;
    box-shadow: 1px 2px 2px rgba(0, 0, 0, 0.1);
}

.image-grid img:hover {
    margin-left: -1px;
    margin-top: -1px;
    box-shadow: 2px 4px 4px rgba(0, 0, 0, 0.1);
}

/* @media (max-aspect-ratio: 1/1) {
    .image-grid li {
        height: 30vh;
    }
} */

/* @media (max-height: 800px) {
    .image-grid li {
        height: 60vh;
    }
} */

@media (max-aspect-ratio: 1/1) and (max-width: 480px) {
    .image-grid {
        flex-direction: row;
    }

    .image-grid li {
        height: auto;
        width: 100%;
    }
    .image-grid img {
        width: 100%;
        max-height: 60vh;
        min-width: 0;
    }

    .image-overlay {
        width: 100vw;
        left: 0;
        top: 10vh;
    }
}

/* Responsive layout - makes the two columns stack on top of each other instead of next to each other */
@media screen and (max-width: 800px) {
    .textiles {
        margin-top: 108px;
        width: 90%;
    }

    .column {
        -ms-flex: 50%;
        flex: 50%;
        max-width: 50%;
    }

    .image-container {
        width: 300px;
    }
}
