/* Tuhorn Labels */

/* 이미지 위 오버레이 라벨의 기준점 */
.woocommerce ul.products li.product,
.products .product {
	position: relative;
}

.thl-group {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	box-sizing: border-box;
	max-width: 100%;
}

/* ---- 이미지 위(오버레이) ---- */
.thl-top-left,
.thl-top-right,
.thl-bottom-left,
.thl-bottom-right {
	position: absolute;
	z-index: 5;
	flex-direction: column;
	flex-wrap: nowrap;
	max-width: 70%;
	pointer-events: none;
}
.thl-top-left     { top: 8px;    left: 8px;  align-items: flex-start; }
.thl-top-right    { top: 8px;    right: 8px; align-items: flex-end; }
.thl-bottom-left  { bottom: 8px; left: 8px;  align-items: flex-start; }
.thl-bottom-right { bottom: 8px; right: 8px; align-items: flex-end; }

/* 상품 상세 페이지처럼 흐름 안에 넣을 때 */
.thl-group.thl-flow {
	position: static;
	flex-direction: row;
	flex-wrap: wrap;
	max-width: 100%;
	margin: 0 0 10px;
	pointer-events: auto;
}
.thl-flow.thl-top-right,
.thl-flow.thl-bottom-right,
.thl-flow.thl-below-right  { justify-content: flex-end; }
.thl-flow.thl-below-center { justify-content: center; }

/* ---- 썸네일 아래 (겹치지 않음) ---- */
.thl-below-left,
.thl-below-center,
.thl-below-right {
	position: static;
	margin: 6px 0 4px;
	width: 100%;
}
.thl-below-left   { justify-content: flex-start; }
.thl-below-center { justify-content: center; }
.thl-below-right  { justify-content: flex-end; }

/* ---- 라벨 본체 ---- */
.thl-label {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	box-sizing: border-box;
	max-width: 100%;
	overflow: hidden;
	padding: .35em .7em;
	background: var(--thl-bg, #222);
	color: var(--thl-color, #fff);
	font-size: var(--thl-fs, 13px);
	font-weight: 600;
	line-height: 1.25;
	white-space: nowrap;
	text-align: center;
	text-decoration: none;
	letter-spacing: 0;
}
.thl-shape-square { border-radius: 0; }
.thl-shape-round  { border-radius: 6px; }
.thl-shape-pill   { border-radius: 999px; }

.thl-cd { font-variant-numeric: tabular-nums; }

/* ---- 이미지 라벨 (이미지 위에 글자 겹치기 가능) ---- */
.thl-kind-image {
	display: inline-grid;
	padding: 0;
	background: none;
	border-radius: 0;
}
.thl-kind-image .thl-img {
	grid-area: 1 / 1;
	display: block;
	width: var(--thl-img-w, 80px);
	max-width: 100%;
	height: auto;
	margin: 0;
	box-shadow: none;
}
.thl-kind-image .thl-text {
	grid-area: 1 / 1;
	align-self: center;
	justify-self: center;
	color: var(--thl-color, #fff);
	text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
	padding: 0 .3em;
}

/* ---- 모바일 ---- */
@media (max-width: 768px) {
	.thl-label {
		font-size: var(--thl-fs-m, 11px);
	}
	.thl-label.thl-auto {
		font-size: clamp(var(--thl-min, 8px), 3.4vw, var(--thl-fs-m, 11px));
	}
	.thl-kind-image .thl-img {
		width: var(--thl-img-wm, 56px);
	}
	.thl-top-left,
	.thl-top-right,
	.thl-bottom-left,
	.thl-bottom-right {
		max-width: 80%;
	}
	.thl-top-left, .thl-top-right { top: 5px; }
	.thl-bottom-left, .thl-bottom-right { bottom: 5px; }
	.thl-top-left, .thl-bottom-left { left: 5px; }
	.thl-top-right, .thl-bottom-right { right: 5px; }
}

/* ---- 관리자 미리보기 ---- */
#thl-prev { max-width: 100%; }
