/* 제품 목록 공통 화면 (브랜드 · 측정 항목) */
.tmf { background: #fff; --f-ink: #0F172A; --f-ink2: #334155; --f-mute: #64748B; --f-faint: #94A3B8; --f-line: #E2E8F0; --f-line2: #EEF2F6; --f-soft: #F8FAFC; --f-top: 101px; color: var(--f-ink); }
.tmf *, .tmf *::before, .tmf *::after { box-sizing: border-box; }
.tmf svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.tmf [hidden] { display: none !important; }
.tmf-wrap { width: min(1360px, calc(100% - 48px)); margin: 0 auto; }

/* 상단 전환 (브랜드 / 측정 항목) */
.tmf-switch { border-bottom: 1px solid var(--f-line2); background: linear-gradient(180deg, #fff, var(--f-soft)); }
.tmf-switch .tmf-wrap { padding: 22px 0 24px; }
.tmf-switch__label { margin: 0 0 12px; color: var(--f-mute); font-size: 12.5px; font-weight: 800; letter-spacing: .02em; }
.tmf-switch__list a { display: inline-flex; align-items: center; gap: 10px; min-width: 0; border: 1px solid var(--f-line); background: #fff; color: var(--f-ink2); font-weight: 700; letter-spacing: -.025em; text-decoration: none; white-space: nowrap; transition: border-color .15s, background .15s, color .15s, transform .15s; }
.tmf-switch__list a:hover { border-color: #CBD5E1; color: var(--f-ink); transform: translateY(-1px); }
.tmf-switch__list a.is-on { border-color: var(--f-ink); background: var(--f-ink); color: #fff; transform: none; }
.tmf-switch__list a span { overflow: hidden; text-overflow: ellipsis; }

/* 측정 항목: 아이콘 타일 */
.tmf-switch.is-tiles .tmf-switch__row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.tmf-switch.is-tiles a { height: 52px; padding: 0 14px 0 8px; border-radius: 14px; font-size: 14.5px; }
.tmf-switch.is-tiles a i { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--f-soft); color: var(--f-ink2); }
.tmf-switch.is-tiles a i svg { width: 18px; height: 18px; }
.tmf-switch.is-tiles a.is-on i { background: rgba(255, 255, 255, .12); color: #fff; }

/* 브랜드: 관계별 줄 */
.tmf-switch.is-grouped .tmf-switch__list { display: grid; gap: 10px; }
.tmf-switch.is-grouped .tmf-switch__row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tmf-switch.is-grouped em { flex: none; width: 92px; color: var(--f-mute); font-size: 12.5px; font-style: normal; font-weight: 800; }
.tmf-switch.is-grouped a { height: 38px; padding: 0 16px; border-radius: 999px; font-size: 14px; }

/* 본문 배치 */
.tmf-layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 44px; padding: 36px 0 96px; }
.tmf-side__box { position: sticky; top: calc(var(--f-top) + 20px); max-height: calc(100vh - var(--f-top) - 40px); overflow-y: auto; scrollbar-width: none; padding-bottom: 8px; }
.tmf-side__box::-webkit-scrollbar { display: none; }
.tmf-side__group > p { margin: 20px 12px 6px; color: var(--f-faint); font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.tmf-nav { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 38px; padding: 8px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--f-ink2); font: inherit; font-size: 14.5px; font-weight: 600; letter-spacing: -.02em; line-height: 1.35; text-align: left; text-decoration: none; cursor: pointer; transition: background .15s, color .15s; }
.tmf-nav span { flex: 1; min-width: 0; }
.tmf-nav small { flex: none; min-width: 26px; padding: 2px 7px; border-radius: 999px; background: var(--f-soft); color: var(--f-mute); font-size: 11.5px; font-weight: 700; text-align: center; }
.tmf-nav:hover { background: var(--f-soft); color: var(--f-ink); }
.tmf-nav.is-on { background: var(--f-ink); color: #fff; }
.tmf-nav.is-on small { background: rgba(255, 255, 255, .16); color: #fff; }
.tmf-nav.is-all { font-weight: 800; }
.tmf-nav.is-link { color: var(--f-mute); }
.tmf-nav.is-link svg { width: 14px; height: 14px; }

/* 제목 · 검색 바 */
.tmf-bar { position: sticky; top: var(--f-top); z-index: 5; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: -12px 0 8px; padding: 12px 0 18px; border-bottom: 1px solid var(--f-line); background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.tmf-bar__title { min-width: 0; }
.tmf-bar__title p { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; color: var(--f-mute); font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.tmf-bar__title p b { padding: 3px 8px; border: 1px solid var(--f-line); border-radius: 6px; color: var(--f-ink2); font-size: 11.5px; font-weight: 700; letter-spacing: 0; }
.tmf-bar__title h2 { margin: 0; color: var(--f-ink); font-size: clamp(24px, 2.2vw, 30px); font-weight: 900; letter-spacing: -.045em; line-height: 1.2; word-break: keep-all; }
.tmf-bar__title > span { display: block; margin-top: 6px; color: var(--f-mute); font-size: 14px; font-weight: 600; }
.tmf-search { position: relative; flex: none; display: flex; align-items: center; width: min(340px, 100%); height: 46px; border: 1px solid var(--f-line); border-radius: 12px; background: #fff; transition: border-color .15s; }
.tmf-search:focus-within { border-color: var(--f-ink); }
.tmf-search > svg { position: absolute; left: 14px; color: var(--f-faint); }
.tmf-search input { width: 100%; height: 100%; padding: 0 40px 0 40px; border: 0; border-radius: 12px; background: transparent; color: var(--f-ink); font: inherit; font-size: 15px; font-weight: 600; outline: 0; -webkit-appearance: none; appearance: none; }
.tmf-search input::-webkit-search-cancel-button { display: none; }
.tmf-search input::placeholder { color: var(--f-faint); font-weight: 500; }
.tmf-search__clear { position: absolute; right: 8px; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: var(--f-soft); color: var(--f-mute); cursor: pointer; }

/* 그룹 · 라인 */
.tmf-group { margin-top: 30px; }
.tmf-group__head { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; }
.tmf-group__head h3 { flex: none; margin: 0; color: var(--f-ink); font-size: 15px; font-weight: 900; letter-spacing: -.02em; }
.tmf-group__head::after { content: ""; order: 1; flex: 1; height: 1px; background: var(--f-line); }
.tmf-group__head a { order: 2; display: inline-flex; align-items: center; gap: 4px; color: var(--f-mute); font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.tmf-group__head a:hover { color: var(--f-ink); }
.tmf-group__head a svg { width: 14px; height: 14px; }
.tmf-line { margin: 0 0 30px; scroll-margin-top: calc(var(--f-top) + 110px); }
.tmf-line__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.tmf-line__head h4 { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--f-ink); font-size: 18px; font-weight: 800; letter-spacing: -.035em; }
.tmf-line__head h4 small { color: var(--f-faint); font-size: 14px; font-weight: 700; }
.tmf-more { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 4px 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--f-ink2); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.tmf-more:hover { background: var(--f-soft); color: var(--f-ink); }
.tmf-more svg { width: 14px; height: 14px; transition: transform .15s; }
.tmf-more:hover svg { transform: translateX(2px); }
.tmf.is-line .tmf-group__head, .tmf.is-line .tmf-line__head, .tmf.is-searching .tmf-more { display: none; }
.tmf.is-line .tmf-group { margin-top: 24px; }
.tmf.is-searching .tmf-group__head a { display: none; }

/* 제품 카드 */
.tmf-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tmf-line:not(.is-open) .tmf-card.is-extra { display: none; }
.tmf-card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 8px; border: 1px solid var(--f-line2); border-radius: 22px; background: #fff; transition: border-color .2s, box-shadow .2s, transform .2s; }
.tmf-card:hover { border-color: var(--f-line); box-shadow: 0 14px 34px rgba(15, 23, 42, .07); transform: translateY(-3px); }
.tmf-card__link { display: flex; flex-direction: column; flex: 1; color: inherit; text-decoration: none; }
.tmf-card__thumb { position: relative; display: block; aspect-ratio: 5 / 4; min-height: 0; overflow: hidden; border-radius: 16px; background: #F3F5F8; }
.tmf-card__thumb img { position: absolute; top: 12%; left: 12%; width: 76% !important; height: 76% !important; max-width: none; object-fit: contain; mix-blend-mode: multiply; transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.tmf-card:hover .tmf-card__thumb img { transform: scale(1.06); }
.tmf-card__body { display: block; padding: 14px 8px 2px; }
.tmf-card__body em { display: block; margin-bottom: 4px; overflow: hidden; color: var(--f-faint); font-size: 12px; font-style: normal; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.tmf-card__body strong { display: -webkit-box; min-height: 2.9em; overflow: hidden; color: var(--f-ink); font-size: 15.5px; font-weight: 800; letter-spacing: -.035em; line-height: 1.45; word-break: keep-all; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tmf-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 8px 6px; }
.tmf-card__go { display: inline-flex; align-items: center; gap: 4px; color: var(--f-ink); font-size: 13.5px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.tmf-card__go svg { width: 15px; height: 15px; transition: transform .2s; }
.tmf-card:hover .tmf-card__go svg { transform: translateX(3px); }
.tmf-card__quote { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--f-soft); border: 1px solid var(--f-line); color: var(--f-ink2); font-size: 12.5px; font-weight: 700; text-decoration: none; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.tmf-card__quote:hover { border-color: var(--f-ink); background: var(--f-ink); color: #fff; }
.tmf-card__admin { padding: 4px 8px 6px; }
.tmf-card__admin:not(:has(*)) { display: none; }
.tmf-card__admin .tm-pp-link { margin-top: 0; }
.tmf-card__admin .tm-product-card__remove { width: 100%; min-height: 30px; margin-top: 6px; border: 1px dashed #CBD5E1; border-radius: 8px; background: var(--f-soft); color: var(--f-mute); font-size: 11.5px; font-weight: 700; cursor: pointer; }

.tmf-empty-line { margin: 0; padding: 18px 20px; border: 1px dashed var(--f-line); border-radius: 14px; background: var(--f-soft); color: var(--f-mute); font-size: 14px; }
.tmf-noresult { margin: 28px 0 0; padding: 40px 24px; border: 1px solid var(--f-line); border-radius: 18px; background: var(--f-soft); text-align: center; }
.tmf-noresult b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.03em; }
.tmf-noresult span { display: block; margin-top: 6px; color: var(--f-mute); font-size: 14.5px; }
.tmf-noresult div { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.tmf-noresult button, .tmf-noresult a { display: inline-flex; align-items: center; height: 42px; padding: 0 18px; border: 1px solid var(--f-line); border-radius: 10px; background: #fff; color: var(--f-ink); font: inherit; font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer; }
.tmf-noresult button { border-color: var(--f-ink); background: var(--f-ink); color: #fff; }

.tmf-help { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 44px; padding: 24px 28px; border: 1px solid var(--f-line); border-radius: 18px; background: var(--f-soft); }
.tmf-help b { display: block; font-size: 17px; font-weight: 800; letter-spacing: -.03em; }
.tmf-help span { display: block; margin-top: 4px; color: var(--f-mute); font-size: 14.5px; }
.tmf-help a { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 46px; padding: 0 20px; border-radius: 12px; background: var(--f-ink); color: #fff; font-size: 14.5px; font-weight: 800; text-decoration: none; }

/* 관리자 도구 자리 */
.tmf .tm-admin-builder { margin: 20px 0 0; }

@media (max-width: 1240px) {
    .tmf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tmf-switch.is-tiles .tmf-switch__row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 920px) {
    .tmf { --f-top: 77px; }
    .tmf-wrap { width: calc(100% - 32px); }
    .tmf-switch .tmf-wrap { padding: 12px 0 14px; }
    .tmf-switch__label { display: none; }
    .tmf-switch__list { display: flex !important; gap: 6px; margin: 0 -16px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
    .tmf-switch__list::-webkit-scrollbar { display: none; }
    .tmf-switch__row { display: contents !important; }
    .tmf-switch.is-grouped em { width: auto; margin: 0 2px 0 8px; font-size: 11.5px; white-space: nowrap; align-self: center; }
    .tmf-switch.is-grouped em:first-child { margin-left: 0; }
    .tmf-switch.is-tiles a, .tmf-switch.is-grouped a { flex: none; height: 40px; padding: 0 14px 0 6px; border-radius: 999px; font-size: 14px; }
    .tmf-switch.is-grouped a { padding: 0 14px; }
    .tmf-switch.is-tiles a i { width: 28px; height: 28px; border-radius: 999px; }
    .tmf-layout { display: block; padding: 0 0 72px; }
    .tmf-side { position: sticky; top: var(--f-top); z-index: 6; margin: 0 -16px; padding: 10px 16px; border-bottom: 1px solid var(--f-line); background: rgba(255, 255, 255, .97); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
    .tmf-side__box { position: static; display: flex; gap: 6px; max-height: none; overflow-x: auto; overflow-y: hidden; padding: 0; }
    .tmf-side__group { display: contents; }
    .tmf-side__group > p { display: none; }
    .tmf-nav { flex: none; width: auto; min-height: 36px; padding: 0 12px; border: 1px solid var(--f-line); border-radius: 999px; font-size: 14px; white-space: nowrap; }
    .tmf-nav.is-on { border-color: var(--f-ink); }
    .tmf-nav small { min-width: 0; padding: 1px 6px; }
    .tmf-nav.is-all svg { display: none; }
    .tmf-bar { position: static; display: block; margin: 0; padding: 22px 0 16px; background: #fff; }
    .tmf-search { width: 100%; margin-top: 14px; }
    .tmf-group { margin-top: 24px; }
    .tmf-line { scroll-margin-top: calc(var(--f-top) + 70px); }
    .tmf-help { display: block; padding: 22px; }
    .tmf-help a { margin-top: 14px; }
}
@media (max-width: 640px) {
    .tmf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .tmf-card { padding: 6px; border-radius: 18px; }
    .tmf-card__thumb { border-radius: 13px; }
    .tmf-card__body { padding: 10px 6px 0; }
    .tmf-card__body em { font-size: 11px; }
    .tmf-card__body strong { font-size: 14px; }
    .tmf-card__foot { padding: 8px 6px 4px; }
    .tmf-card__go { display: none; }
    .tmf-card__quote { flex: 1; justify-content: center; height: 32px; font-size: 12.5px; }
    .tmf-line__head h4 { font-size: 17px; }
    .tmf-noresult div { flex-direction: column; }
}
.tmf-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin: 0 0 30px; }
.tmf-links a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border: 1px solid var(--f-line); border-radius: 14px; background: #fff; color: var(--f-ink); text-decoration: none; transition: border-color .15s; }
.tmf-links a:hover { border-color: var(--f-ink); }
.tmf-links b { display: block; font-size: 15.5px; font-weight: 800; letter-spacing: -.03em; }
.tmf-links em { display: block; margin-top: 3px; color: var(--f-mute); font-size: 13px; font-style: normal; }
.tmf.is-searching .tmf-links { display: none; }
@media (max-width: 640px) {
    /* 전체 보기에서는 라인별로 옆으로 넘겨 보기 → 세로 길이 절약 */
    .tmf-line:not(.is-open) .tmf-grid { display: flex; gap: 10px; margin: 0 -16px; padding: 0 16px 4px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; scrollbar-width: none; }
    .tmf-line:not(.is-open) .tmf-grid::-webkit-scrollbar { display: none; }
    .tmf-line:not(.is-open) .tmf-card { flex: 0 0 44%; scroll-snap-align: start; }
}
/* 모바일: 상위 요소의 overflow-x:hidden 때문에 분류 바가 고정되지 않는 문제 */
@media (max-width: 920px) {
    html:has(.tmf), body:has(.tmf), body:has(.tmf) .tm-site, body:has(.tmf) .tm-content { overflow-x: clip !important; overflow-y: visible !important; }
}

/* 상단 검색 히어로 (브랜드 · 측정 항목) – 바탕·눈금은 site-modern.css 공통 */
.tmf-hero::before { -webkit-mask-image: radial-gradient(ellipse 70% 100% at 50% 40%, transparent 25%, #000 85%) !important; mask-image: radial-gradient(ellipse 70% 100% at 50% 40%, transparent 25%, #000 85%) !important; }
.tmf-hero { background: radial-gradient(ellipse 45% 70% at 50% 0%, rgba(16, 185, 129, .18), transparent 70%), #0B1220 !important; }
.tmf-hero__inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; width: min(var(--tm-max, 1400px), calc(100% - 40px)); margin: 0 auto; padding: clamp(56px, 6vw, 84px) 0 clamp(70px, 7vw, 96px); text-align: center; }
.tmf-hero__crumb { display: flex; align-items: center; gap: 8px; margin-bottom: 26px; font-size: 13px; font-weight: 600; }
.tmf-hero__crumb a { color: rgba(255, 255, 255, .5); text-decoration: none; }
.tmf-hero__crumb span { color: rgba(255, 255, 255, .25); }
.tmf-hero__crumb strong { color: rgba(255, 255, 255, .9); font-weight: 700; }
.tmf-hero__eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px; color: #34D399; font-size: 12.5px; font-weight: 800; letter-spacing: .2em; }
.tmf-hero__eyebrow b { padding: 4px 10px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; color: rgba(255, 255, 255, .85); font-size: 11.5px; font-weight: 700; letter-spacing: 0; }
.tmf-hero h1 { margin: 0; color: #fff; font-size: clamp(40px, 4.6vw, 64px); font-weight: 800; letter-spacing: -.05em; line-height: 1.1; word-break: keep-all; }
.tmf-hero__desc { max-width: 640px; margin: 18px 0 0; color: #94A3B8; font-size: clamp(15px, 1.1vw, 17px); line-height: 1.75; word-break: keep-all; }
.tmf-hero__search { position: relative; display: flex; align-items: center; width: min(680px, 100%); height: 64px; margin-top: 34px; padding: 0 8px 0 0; border-radius: 16px; background: #fff; }
.tmf-hero__search > svg { position: absolute; left: 22px; width: 20px; height: 20px; color: #94A3B8; }
.tmf-hero__search input { flex: 1; min-width: 0; height: 100%; padding: 0 16px 0 54px; border: 0; border-radius: 16px; background: transparent; color: #0F172A; font: inherit; font-size: 16.5px; font-weight: 600; outline: 0; -webkit-appearance: none; appearance: none; }
.tmf-hero__search input::-webkit-search-cancel-button { display: none; }
.tmf-hero__search input::placeholder { color: #94A3B8; font-weight: 500; }
.tmf-hero__search button { flex: none; height: 48px; padding: 0 24px; border: 0; border-radius: 12px; background: #0F172A; color: #fff; font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; }
.tmf-hero__tags { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; max-width: 760px; margin-top: 20px; }
.tmf-hero__tags span { margin-right: 4px; color: rgba(255, 255, 255, .5); font-size: 13px; font-weight: 700; }
.tmf-hero__tags button { height: 34px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; background: rgba(255, 255, 255, .04); color: rgba(255, 255, 255, .88); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.tmf-hero__tags button.is-on { border-color: #34D399; color: #34D399; }
.tmf-hero .tm-subvisual-builder-open { position: absolute; top: 20px; right: 0; z-index: 2; }
.tmf-switch { background: #fff; }
@media (max-width: 900px) {
    .tmf-hero__inner { width: calc(100% - 32px); padding: 40px 0 56px; }
    .tmf-hero__crumb { margin-bottom: 18px; }
    .tmf-hero__search { height: 56px; margin-top: 26px; padding-right: 6px; border-radius: 14px; }
    .tmf-hero__search input { font-size: 16px; padding-left: 48px; }
    .tmf-hero__search > svg { left: 18px; }
    .tmf-hero__search button { height: 44px; padding: 0 16px; }
    .tmf-hero__tags span { width: 100%; margin: 0 0 2px; }
}
@media (max-width: 640px) {
    .tmf-hero__tags button:nth-of-type(n+4) { display: none; }
    .tmf-hero__desc { font-size: 14.5px; }
}
