* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 10;
    display: none;
}

.popup-window {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -57%);
    width: 50rem;
    height: 27rem;
    background-color: #FFFFFF;
    border-radius: 5px;
    z-index: 15;
    display: none;
}

.popup-content {
    display: flex;
    flex-direction: row;
    height: 100%;
    padding: 1rem;
}

.artwork_img{
    height: 100%;
    width: auto;
    object-fit: cover;
}

.text {
    width: 48%;
    padding-top: 1rem;
    padding-left: 1.7rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto; /*텍스트 넘치면 스크롤 가능*/
}

.text div {
    margin-bottom: 0.5rem;
}

.name {
    font-size: 1.2rem;
    padding-bottom: 0.1rem;
}
.title {
    font-size: 1.6rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #E6E6E6;
}
.size {
    padding-top: 1.5rem;
    font-size: 0.95rem;
    color: #777777;
    padding-bottom: 0.1rem;
    line-height: 1.3;
}
.material {
    font-size: 0.95rem;
    color: #777777;
    padding-bottom: 0.1rem;
    line-height: 1.3;
}

.year {
    font-size: 0.95rem;
    color: #777777;
    padding-bottom: 1.5rem;
}
.detail {
    line-height: 1.3;
}

.close-button {
    position: absolute;
    bottom: -5rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: #E6E6E6;
    border: none;
    border-radius: 30px;
    height: 40px;
    padding: 0 90px;
    font-size: 1rem;
    cursor: pointer;
}

.close-icon {
    display: none;
}

@media (max-width: 850px) {
    .close-icon {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1rem;
        width: 2rem;
        height: 2rem;
        cursor: pointer;
        z-index: 20;
    }

    .popup-window {
        top: auto; /* 화면 하단에 */
        bottom: 0;
        left: 0;
        transform: none;
        width: 100%;
        height: 80vh;
        border-radius: 20px 20px 0 0;
        overflow-y: auto;
    }

    .popup-content {
        position: absolute;
        top: 0; /* 팝업 상단 */
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column; /* 세로 정렬 */
        align-items: center; /* 가운데 정렬 */
        margin-top: 0.5rem;
        padding-top: 3rem; /* 닫기 버튼 아래 여백 */
    }

    .artwork_img {
        width: 13rem; height: auto;
        margin-bottom: 1rem; /* 이미지 아래 여백 */
    }

    .title {
        padding-bottom: 1rem;
    }
    .size {
        padding-top: 1rem;
    }

    .text {
        width: 85%; /* 텍스트 너비 */
        padding-left: 0rem;
    }

    .year {
        padding-bottom: 1rem;
    }

    .detail {
        padding-bottom: 4rem;
    }

    .close-button {
        display: none;
    }
}
