/* 오버레이 */
.overlaySlot {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 99999;
    justify-content: center;
    align-items: center;
}

/* 팝업 레이어 */
.modalSlot {
    position: relative;
    background: white;
    width: 90%;
    max-width: 90%;
    max-height: 90%;
    min-height: 90%;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.modalSlot-header {
    padding: 10px;
    background: #83491c;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modalSlot-header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #fff;
    line-height: 1;
}

.modalSlot-header .search-container {
    display: flex;
    gap: 0.5rem;
}

.modalSlot-header input[type="text"] {
    padding: 0.4rem;
}

.close-btn-Slot {
    color: #fff;
    cursor: pointer;
    font-size: 1.6rem;
    padding: 0;
    margin-left: 1rem;
    background: none;
    border: none;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modalSlot-content {
    background: #000000;
    padding:10px;
    overflow-y: auto;
    flex: 1;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 기본: PC 10개 */
    gap: 1rem;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .image-grid {
        grid-template-columns: repeat(2, 1fr); /* 모바일: 2개 */
    }
}

.image-grid img {
    width: 100%;
    border-radius: 4px;
}

/* 버튼 */
.openModalBtn {
    margin: 2rem;
    padding: 1rem 2rem;
    font-size: 1rem;
}

@media (max-width: 600px) {
    .modalSlot-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .modalSlot-header .search-container {
        width: 100%;
    }

    .modalSlot-header input[type="text"] {
        width: 100%;
    }

    .close-btn-Slot {
        cursor: pointer;
        font-size: 1.2rem;
        padding: 0.3rem 0.6rem;
        background: none;
        border: none;
    }
}

@media (max-width: 768px) {
    .modalSlot-header {
        flex-direction: column;
        align-items: flex-start;
        position: relative;
    }

    .close-btn-Slot {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
        font-size: 1.8rem;
        padding: 0.2rem 0.4rem;
        z-index: 2;
    }
}

.image-item {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #fff;
    border: 2px solid transparent;
    border-radius: 6px;
    /*padding: 0.5rem;*/
    transition: all 0.3s ease-in-out;
    overflow: hidden;
}

.image-item img {
    width: 100%;
    display: block;
    transition: all 0.3s ease-in-out;
    border-radius: 8px;
}

.image-item:hover {
    border-color: rgb(130, 72, 28);
    width: 100%;
    display: block;
    transition: all 0.3s ease-in-out;

    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.6);
    transform: scale(1.05);
}

.image-title {
    margin-top: 0.5rem;
    font-size: 20px;
    word-break: break-word;
}
.search-input {
    flex: 1;
    max-width: 200px;
    margin-left: auto;
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}


/* 검색 래퍼: input + 버튼을 묶음 */
.search-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

@media (max-width: 768px) {
    .search-input {
        margin-left: initial;
        border: none;
        max-width: 100px;
    }

    .search-wrap {
        margin: initial;
        margin-left: unset;
    }
}





/* 돋보기 버튼 스타일 */
.search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    background: transparent;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    color: #ccc;
    line-height: 0;
}
.search-btn:hover {
    background: rgba(0,0,0,0.04);
}
.search-btn:active {
    transform: translateY(1px);
}