/* ===== 필터 영역 ===== */
.magazine-filter {
    padding: 1.2rem 0;
	position: sticky;
	top: 8.2rem;
	background-color: #fff;
	z-index: 10;
}

/* Swiper 카테고리 */
.magazine-filter .category-swiper {
    overflow: hidden;
}

.magazine-filter .category-swiper .swiper-slide {
    width: auto;
}

.magazine-filter .cat-btn {
    display: block;
    padding: .8rem 1.2rem;
    border-radius: 9.9rem;
    border: 1px solid #D4D4D4;
    background: #fff;
    font-size: 1.2rem;
    font-weight: 500;
	line-height: 1.6rem;
    color: #a1a1a1;
    white-space: nowrap;
}

.magazine-filter .cat-btn.active {
    background: #404040;
    border-color: #404040;
    color: #fff;
}

/* 카운트 & 정렬 */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
	padding: 0 1.6rem 0.8rem;
    height: 2.8rem;
}

.total-count {
    font-size: 1.2rem;
	font-weight: 500;
	line-height: 1.6rem;
    color: #a1a1a1;
}

/* 정렬 드롭다운 */
.sort-dropdown {
    position: relative;
}

.sort-btn {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem 0;
    background: none;
    border: none;
    font-size: 1.2rem;
    font-weight: 500;
	line-height: 1.6rem;
    color: #a1a1a1;
}

.sort-btn::after {
    content: '';
    width: 1.6rem;
    height: 1.6rem;
    background-image: url("/asset/icons/common/arrow_down_magazine.png");
    background-size: contain;
}

.sort-dropdown.open .sort-btn::after {
    background-image: url("/asset/icons/common/arrow_up_magazine.png");
}

.sort-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 .4rem 1.2rem rgba(0,0,0,.1);
    overflow: hidden;
    z-index: 10;
    min-width: 10rem;
}

.sort-dropdown.open .sort-menu {
    display: block;
}

.sort-menu a {
    display: block;
    padding: 1rem 1.4rem;
    font-size: 1.2rem;
    color: #737373;
    text-decoration: none;
    transition: background .2s;
}

.sort-menu a:hover,
.sort-menu a.active {
    background: #f5f5f5;
    color: #262626;
}

.sort-menu a.active {
    font-weight: 600;
}


/* ===== 매거진 리스트 ===== */
.magazines {
    padding-bottom: .8rem 0 8rem;
}

.magazines:not(.magazine-swiper) ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 0.2rem;
}

.magazines:not(.magazine-swiper) li {
    list-style: none;
    margin: 0;
    padding: 0;
    box-shadow: none;
    border-radius: 0;
}

.magazines li a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.magazines .thumb {
    position: relative;
    aspect-ratio: 187 / 120;
    overflow: hidden;
}

.magazines .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.magazines .badge-new {
    position: absolute;
    background-color: #FF41A2;
    width: 26px;
    height: 12px;
    padding: 2px 4px;
    text-align: center;
    bottom: 0;
    left: 0;
    font-size: 10px;
    font-weight: 500;
    line-height: 12px;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
}

.magazines .tags {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
}

.magazines .tag {
    font-size: .8rem;
    padding: .2rem .4rem;
    font-weight: 500;
    line-height: 1rem;
}

.magazines .tag.fashion {
    background: rgba(114, 92, 255, 0.10);
    color: #725CFF;
}

.magazines .tag.travel {
    background: rgba(65, 162, 255, 0.10);
    color: #41A2FF;
}

.magazines .tag.trend {
    background: rgba(0, 184, 90, 0.10);
    color: #00B85A;
}

.magazines .tag.beauty {
    background: rgba(255, 92, 159, 0.10);
    color: #FF5C9F;
}

.magazines .tag.food {
    background: rgba(245, 131, 0, 0.10);
    color: #F58300;
}

.magazines .magazine-info {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: .8rem;
}

.magazines .title {
    font-size: 1.3rem;
    font-weight: 500;
    line-height: 1.6rem;
    overflow: hidden;
    white-space: pre-line;
}

.magazines .sub-text {
    font-size: 1.1rem;
    font-weight: 400;
    color: #737373;
    line-height: 1.4rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;   /* 최대 2줄 */
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    white-space: pre-line;

}

.magazines .meta {
    display: flex;
    align-items: center;
    gap: .8rem;
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.4rem;
    color: #a1a1a1;
    margin-top: .4rem;
}

.magazines .meta .views {
    display: flex;
    align-items: center;
}

.magazines .meta .views::before {
    content: '';
    display: inline-block;
    width: 1.1rem;
    height: 1.1rem;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23aaa'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 12a3 3 0 11-6 0 3 3 0 016 0z'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    margin-right: .25rem;
}

.magazines .empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 5rem 0;
    color: #999;
    font-size: 1.4rem;
}

/**/
.magazine-swiper ul {
    display: flex !important;
}

.magazine-swiper .magazine-info {
    padding: 1.2rem 0.8rem; /* 좁은 공간에 맞게 패딩 조정 */
}

/* 팝업 스크롤 강제 */
.scrap-contents-popup > div {
    max-height: 100%;
    overflow-y: auto;
}

.scrap-contents-popup .magazines {
    padding-bottom: 2rem;
}


/*View.php*/
	@font-face {
		font-family: 'Gotham';
		src: url('/asset/fonts/GOTHAM-MEDIUM.TTF') format('truetype');
		/* 파일 경로와 형식 */
		font-weight: normal;
		font-style: normal;
	}

	.magazine-content-wrapper {
        visibility: hidden;
		/* overflow: hidden;
        position: relative; */
		/* JS에서 이 요소에 height 적용 */
	}

    .magazine-content-wrapper.ready {
        visibility: visible;
    }

	.magazine-viewport {
		width: 100%;
		/* background: #eee; */
	}

	.magazine-content {
		width: 800px;
		transform-origin: 0 0;
	}

	.magazine-viewport .header-detail a:nth-child(3) {
		margin: 0 !important;
	}

	.floating-navigator ul .scrap {
		background: url('/asset/icons/common/scrap-2026.png') no-repeat 0 0 / 4rem auto;
		height: 4rem;
	}

	.floating-navigator ul .scrap.on {
		background: url('/asset/icons/common/scrap-on-2026.png') no-repeat 0 0 / 4rem auto;
		height: 4rem;
	}

	.contents-title {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		background-color: #fff;
		padding: 4.8rem 4rem;
	}

	.contents-title p:nth-child(1) {
		font-size: 2.8rem;
		font-weight: 500;
		color: #a1a1a1;
		line-height: 3.6rem;
	}

	.contents-title p:nth-child(2) {
		font-size: 4rem;
		font-weight: 700;
		color: #121212;
		max-width: 88%;
		line-height: 6rem;
		white-space: pre-line;
        text-align: center;
        margin-top: 2.4rem;
	}

	.contents-title .sub-info {
		display: flex;
		align-items: center;
		color: #121212;
		font-size: 2.4rem;
		font-weight: 400;
		line-height: 3.2rem;
        margin-top: 4rem;
	}

	.contents-title .sub-info img {
		width: 2.8rem;
		height: 2.8rem;
		margin-right: 0.8rem;
		vertical-align: middle;
		display: inline-block;
	}

	/*평가영역*/
	.magazine-evaluation {
		padding: 2.4rem 1.6rem 13rem;
		background-color: #fff;
	}

	.magazine-evaluation .eval-box {
		background-color: #F5F5F5;
		border-radius: 1.6rem;
		padding: 2.4rem;
		text-align: center;
	}

	.magazine-evaluation .eval-title {
		font-size: 1.1rem;
		font-weight: 400;
		line-height: 1.6rem;
		color: #737373;
		margin-bottom: 2rem;
	}

	.magazine-evaluation .eval-title .highlight {
		background: linear-gradient(90deg, #FF6B9D, #C084FC);
		-webkit-background-clip: text;
		-webkit-text-fill-color: transparent;
		background-clip: text;
	}

	/* 버튼 영역 */
	.magazine-evaluation .eval-buttons {
		display: flex;
		justify-content: center;
		gap: 1.2rem;
	}

	.magazine-evaluation .eval-btn {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: .6rem;
		padding: 1.2rem 2.4rem;
		border: 1px solid #d4d4d4;
		border-radius: 10rem;
		background: #fff;
		cursor: pointer;
		transition: all .2s;
	}

	.magazine-evaluation span {
		font-size: 1.3rem;
		font-weight: 500;
		color: #121212;
	}

	.magazine-evaluation .eval-btn img {
		width: 1.6rem;
		height: 1.6rem;
	}

	.magazine-evaluation .eval-btn.active {
		border-color: #FF41A2;
	}
	
	.magazine-evaluation .eval-btn.active span {
		color: #FF41A2;
	}

	/* 코멘트 영역 */
	.magazine-evaluation .eval-comment {
		display: none;
		margin-top: 2rem;
	}

	.magazine-evaluation .eval-comment.show {
		display: block;
	}

	.magazine-evaluation .eval-textarea {
		width: 100%;
		height: 12rem;
		padding: 1.4rem;
		border: 1px solid #D4D4D4;
		border-radius: .8rem;
		font-size: 1.3rem;
		line-height: 1.6;
		resize: none;
		box-sizing: border-box;
		background-color: #fff;
	}

	.magazine-evaluation .eval-textarea:focus {
		outline: none;
		border-color: #262626;
	}

	.magazine-evaluation .eval-textarea::placeholder {
		color: #a1a1a1;
	}

	.magazine-evaluation .textarea-hint {
		font-size: 1.1rem;
		color: #a1a1a1;
		margin-top: .8rem;
		text-align: left;
	}

	.magazine-evaluation .eval-submit {
		width: 100%;
		padding: 1.2rem 2.4rem;
		margin-top: 2rem;
		background: #121212;
		border: none;
		border-radius: .8rem;
		font-size: 1.3rem;
		font-weight: 700;
		color: #fff;
		cursor: pointer;
	}

	/* 완료 메시지 */
	.magazine-evaluation .eval-complete {
		font-size: 1.6rem;
		font-weight: 700;
		color: #121212;
	}

	.toast-message {
		position: fixed;
		bottom: 12rem;
		left: 50%; /* 화면 가로 중앙 기준 */
    	transform: translateX(-50%); /* 가운데 정렬 */
		background: #2c2c2c;
		color: #fff;
		padding: 1.2rem 1.6rem;
		border-radius: 10rem;
		font-size: 1.2rem;
		font-weight: 400;
		opacity: 0;
		pointer-events: none;
		transition: opacity 0.5s;
		z-index: 9999;
		min-width: max-content;
	}
	.toast-message.show {
		opacity: 1;
	}

    /*scrap popup*/
    .scrap-detail-wrap .detail-info-wrap>div>div:first-child {
        display: flex;
        align-items: center;
        height: 5.6rem;
        padding: 0 1.6rem 0 4rem;
        box-sizing: border-box;
        position: sticky;
        top: 0;
        z-index: 10;
        background: #fff
    }

    .scrap-detail-wrap .detail-info-wrap>div>div:first-child em {
        font-size: 1.5rem;
        font-weight: 700;
        flex: 1;
        text-align: center
    }

    .scrap-detail-wrap .detail-info-wrap>div>div:first-child img {
        width: 2.4rem;
        height: 2.4rem;
        display: inline-block;
        margin-left: auto
    }

    .scrap-detail-wrap .detail-info-wrap>div {
        position: relative
    }

    .scrap-detail-wrap .detail-info-wrap>div>div:first-child {
        display: flex;
        align-items: center;
        height: 5.6rem;
        padding: 0 1.6rem 0 4rem;
        box-sizing: border-box;
        position: sticky;
        top: 0;
        z-index: 10;
        background: #fff
    }

    .scrap-detail-wrap .detail-info-wrap>div>div:first-child em {
        font-size: 1.5rem;
        font-weight: 700;
        flex: 1;
        text-align: center
    }

    .scrap-detail-wrap .detail-info-wrap>div>div:first-child img {
        width: 2.4rem;
        height: 2.4rem;
        display: inline-block;
        margin-left: auto
    }

    .scrap-detail-wrap .detail-info-wrap>div>div:last-child span img {
        position: relative;
        top: 50%;
        transform: translateY(-50%)
    }