/* 지식마켓 목록 카드 — Tailwind 보조 (pseudo / ebook / purchased) */
.kh-cards {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}
@media (min-width: 640px) {
	.kh-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
}
@media (min-width: 900px) {
	.kh-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
}
@media (min-width: 1200px) {
	.kh-cards { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
}
.kh-cards.is-empty {
	display: block;
}

.kh-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none;
	color: inherit;
	background: #fff;
	border: 1px solid #e8eaed;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(27, 44, 55, 0.04);
	transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.kh-card__link:hover {
	border-color: #d5ebe4;
	box-shadow: 0 8px 20px rgba(27, 44, 55, 0.08);
	transform: translateY(-2px);
}
.kh-card__link:hover .kh-card__img {
	transform: scale(1.05);
}
.kh-card__link:hover .kh-card__ebook-title {
	transform: scale(1.05);
}

.kh-card__thum {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #eef1f4;
}
.kh-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1);
	transition: transform .35s ease;
}

/* 구매완료 오버레이 */
.kh-card__thum.is-purchased::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 2;
	background: rgba(0, 0, 0, 0.45);
}
.kh-card__thum.is-purchased::after {
	content: '';
	position: absolute;
	z-index: 3;
	left: 50%;
	top: 50%;
	width: 88px;
	height: 88px;
	transform: translate(-50%, -50%);
	background: url("https://s3.ap-northeast-2.amazonaws.com/img.podgate.com/static/v3.adpick/images/purchased_img.png") center / contain no-repeat;
}

/* 기본 ebook 썸네일 */
.kh-card__ebook {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px 12px 12px 28px;
	box-sizing: border-box;
}
.kh-card__ebook::before {
	content: '';
	position: absolute;
	left: 12px;
	top: 0;
	width: 5px;
	height: 100%;
	background: #fff;
}
.kh-card__ebook--1 { background: rgba(51, 142, 255, 0.28); color: #4a9eff; }
.kh-card__ebook--2 { background: rgba(72, 207, 173, 0.28); color: #3db896; }
.kh-card__ebook--3 { background: rgba(220, 72, 88, 0.28); color: #d96a78; }
.kh-card__ebook--4 { background: rgba(234, 218, 24, 0.28); color: #c4b83a; }
.kh-card__ebook-title {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	font-weight: 700;
	line-height: 1.25;
	transition: transform .35s ease;
	width: 100%;
}
.kh-card__ebook-title .nick {
	font-size: 13px;
	margin-bottom: 4px;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.kh-card__ebook-title .ebook-label {
	font-size: 15px;
}

.kh-card__title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	word-break: break-word;
}

.kh-card__status--0 { background: #ffce00; color: #1b2c37; }
.kh-card__status--3,
.kh-card__status--5 { background: #d62446; color: #fff; }
.kh-card__status--default { background: #8a939e; color: #fff; }
