#main_gallery {
	width: 100%;
	max-width: 1280px;
	margin: 40px auto 40px auto;
}
#main_gallery .gallery_tabs {
	display: flex;
	justify-content: center;
	gap: 125px;
	margin: 15px 0 30px 0;
}
#main_gallery .gallery_tabs a {
	display: block;
	width: 72px;
	text-align: center;
	font-size: 25px;
	font-weight: 500;
	color: #889AA3;
	padding-bottom: 15px;
	border-bottom:4px solid #fff;
}
#main_gallery .gallery_tabs a.active {
	color: #0D3447;
	border-bottom:4px solid #0D3447;
}
#main_gallery .tab_content {
	display: none;
	width: 100%;
}
#main_gallery .tab_content ul {
	display: flex;
	flex-wrap: wrap;
	gap:25px;
	width: 100%;
	/* background-color: #eee; */
	list-style: none;
	margin: 0;
	padding: 0;
}
#main_gallery .tab_content ul li {
	flex:1 1 16.6%;
	max-width: 236px;
	max-height: 236px;
	justify-content: start;
	overflow: hidden;
	border:1px solid #eee;
	text-align: center;
}
#main_gallery .tab_content ul li.no-data {
	max-width:100% !important;
	padding:100px 0;
	text-align: center;
	border: 1px solid #ccc;
}
#main_gallery .tab_content ul li img {
	/* width: 100%; */
	height: 100%;
	max-height: 234px;

}
#main_gallery .tab_all {
	display: block;
}
#main_gallery .btn-wrap {
	position: relative;
	width:100%;
}
#main_gallery .btn-wrap .horizontal-line {
	position: absolute;
	top: 50%;
	left: 0;
	width: 100%;
  	height: 2px;
  	background-color: #e1e1e1; /* 가로선의 색상 */
	transform: translate(0, -50%);
	z-index: -1;
}
#main_gallery .btn-wrap .loadMore {
  display: block;
  width: 185px;
  height: 60px;
  margin: 20px auto;
  padding: 10px 20px;
  border:1px solid #e1e1e1;
  border-radius: 10px;
  font-size: 20px;
  cursor: pointer;
  color: #0D3447;
  font-weight: 500;
  background-color: #fff;
  z-index: 10;

}
#main_gallery .btn-wrap .loadMore:hover {
	background-color: #eee;
}
#main_gallery .btn-wrap .tab-gradation {
	position: absolute;
	width: 100%;
	bottom: 100%;
	left: 0;
	height: 120px;
	background-image: linear-gradient(transparent 0px,rgba(255,255,255,1) 100px,#fff 150px);
	z-index: 0;
}
#main_gallery .gall_item {
	position: relative;
}
#main_gallery .item_bg {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color:#000;
	opacity: 0;
	transition: opacity 0.3s ease-in-out;
}
#main_gallery .item_info {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	padding: 10px;
	color: #fff;
	text-align: left;
	opacity: 0;
	transition: opacity 0.3s ease-in-out;
}
#main_gallery .gall_item:hover .item_bg {
	opacity: 0.6;
}

#main_gallery .gall_item:hover .item_info {
	opacity: 1;
}

#main_gallery .item_info > div {
	width: 100%;
	white-space: nowrap;
	overflow: hidden;
	margin-top: 3px;
}
#main_gallery .item_info .item_price {
	display: flex;
	gap: 10px;
	justify-content: space-between;
}
#main_gallery .item_info .item_price span {
	display: block;
	flex: 1;
}

/* YOUTUBE */
#youtubeWrap {
	margin: 80px 0;
}
.youtube-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 25px;
	justify-content: center;
}

.youtube-item {
	position: relative;
	width: 100%;
	max-width: 410px;
}
.youtube_subject {
	width: 100%;
	text-align: center;
	padding: 8px;
}
.youtube-thumb {
	position: relative;
	width: 100%;
	max-width: 410px;
	cursor: pointer;
	border-radius: 8px;
	overflow: hidden;
	aspect-ratio: 16 / 9;
}
.youtube-thumb:hover {
	transform: scale(1.02);
}

.youtube-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* 팝업 배경 오버레이 */
.youtube-popup-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* 팝업 본체 */
.youtube-popup-content {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 90%;
    max-width: 960px;
    height: 80vh;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);

    transform: translate(-50%, -50%) scale(0.8); /* 초기 위치 + 크기 */
    opacity: 0;

    animation: popupIn 0.4s ease forwards;
}

/* iframe (유튜브 영상) */
.youtube-popup-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* 닫기 버튼 */
.youtube-popup-close {
    position: absolute;
    top: 12px;
    right: 16px;
    color: white;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: transform 0.2s ease;
}
.youtube-popup-close:hover {
    transform: scale(1.2);
}

/* 등장 애니메이션 */
@keyframes popupIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}


@media screen and (max-width:1280px) {
	#main_gallery .tab_content ul {
		padding:0 10px;
	}
}
@media screen and (max-width:1024px) {

	#main_gallery .tab_content ul li {
		flex:1 1 20%;
		max-width: 227px;
		max-height: 227px;
		justify-content: start;
		overflow: hidden;
	}

}

@media screen and (max-width:768px) {
	#main_gallery .tab_content ul li {
		flex:1 1 25%;
		max-width: 225px;
		max-height: 225px;
		justify-content: start;
		overflow: hidden;
	}

}

@media screen and (max-width:640px) {
	#main_gallery .tab_content ul li {
		flex:1 1 33%;
		max-width: 280px;
		max-height: 280px;
		justify-content: start;
		overflow: hidden;
	}

	.youtube-popup-content {
        height: 60vh;
    }

}

@media screen and (max-width:480px) {
	#main_gallery .tab_content ul li {
		flex:1 1 33%;
		max-width: 160px;
		max-height: 160px;
		justify-content: start;
		overflow: hidden;
	}

}
