/*
 * it-hp TP-Link 파트너 공식 판매사 페이지 전용 스타일 (/sub/tp-link) + 홈 파트너 배지(.tpl-strip)
 * - style.css(Vite 번들)에 섞지 않고 $additional_css 훅으로만 로드한다.
 * - 테마 변수(--blue-*, --navy-*, --border-*, --text-*)만 사용하고 단색만 쓴다.
 * - TP-Link 로고는 글자가 검정이라 밝은 배경 위에서만 쓴다(.tpl-partner, .tpl-strip 모두 흰 배경).
 */

.tpl-page {
    word-break: keep-all;
    overflow-wrap: break-word;
}

/* 줄바꿈: 문장 단위로 줄을 나누고, 괄호·단위 구절은 붙이고, 가운데 정렬 문단은 균형 있게 나눈다 */
.tpl-page .section-header p,
.tpl-page .page-header p {
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
    text-wrap: balance;
}

.tpl-page h1,
.tpl-page h2,
.tpl-page h3 {
    text-wrap: balance;
}

.tpl-page .breadcrumb {
    flex-wrap: wrap;
    row-gap: 4px;
}

.tpl-page .breadcrumb li {
    min-width: 0;
    max-width: 100%;
}

.tpl-page .breadcrumb-item.active {
    white-space: normal;
    overflow-wrap: anywhere;
}

.tpl-page .page-header {
    padding: calc(var(--header-h, 76px) + 18px) 0 22px;
}

.tpl-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tpl-sent {
    display: block;
    text-wrap: balance;
}

.tpl-nw {
    white-space: nowrap;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── 취급 제품군 ───────────────────────────────────── */
.tpl-lines {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 28px;
}

.tpl-line {
    display: flex;
    flex-direction: column;
    padding: 24px;
    border: 1px solid var(--border-color, #e3e8ef);
    border-radius: var(--radius-lg, 12px);
    background: #fff;
}

.tpl-line-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 14px;
    border-radius: 10px;
    background: var(--blue-50, #eaf1ff);
    color: var(--blue-600, #0b4dd8);
    font-size: 1.25rem;
}

.tpl-line h3 {
    margin: 0 0 8px;
    font-size: 1.1875rem;
}

.tpl-line p {
    margin: 0 0 12px;
    color: var(--text-secondary, #344054);
    line-height: 1.7;
}

.tpl-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}

.tpl-tags li {
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--bg-gray, #eef1f5);
    color: var(--text-muted, #475467);
    font-size: 0.8125rem;
    font-weight: 600;
}

.tpl-line-link {
    margin-top: auto;
    color: var(--blue-600, #0b4dd8);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
}

.tpl-line-link:hover,
.tpl-line-link:focus-visible {
    text-decoration: underline;
}

/* ── 견적 요청 ─────────────────────────────────────── */
.tpl-cart-empty {
    padding: 20px;
    border: 1px dashed var(--border-color, #e3e8ef);
    border-radius: var(--radius-md, 8px);
    background: var(--bg-light, #f5f7fa);
    color: var(--text-muted, #475467);
    text-align: center;
}

.tpl-cart-table {
    width: 100%;
    border-collapse: collapse;
}

.tpl-cart-table th,
.tpl-cart-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--border-light, #eef1f5);
    font-size: 0.9375rem;
    text-align: left;
}

.tpl-cart-table th {
    color: var(--text-muted, #475467);
    font-size: 0.8125rem;
}

.tpl-num {
    text-align: right !important;
    white-space: nowrap;
}

.tpl-del {
    padding: 4px 8px;
    border: 0;
    background: transparent;
    color: #b42318;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
}

.tpl-cart-sum {
    margin: 12px 0 4px;
    text-align: right;
    font-size: 1rem;
}

.tpl-cart-sum strong {
    margin-left: 8px;
    color: var(--blue-600, #0b4dd8);
    font-size: 1.25rem;
}

.tpl-consent {
    margin: 4px 0 16px;
    font-size: 0.875rem;
    color: var(--text-secondary, #344054);
}

.tpl-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.tpl-result {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-md, 8px);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.tpl-result-ok {
    border: 1px solid #abefc6;
    background: #ecfdf3;
    color: #067647;
}

.tpl-result-error {
    border: 1px solid #fecdca;
    background: #fef3f2;
    color: #b42318;
}

/* 주문 조회 결과 카드 */
.tpl-order-card {
    margin-top: 12px;
    padding: 14px 16px;
    border: 1px solid #e4e7ec;
    border-radius: var(--radius-md, 8px);
    background: #fff;
}

.tpl-order-card ul {
    margin: 4px 0 8px;
    padding-left: 18px;
}

/* ── 구성 예시 / 활용 분야 / 절차 / FAQ ─────────────── */
.tpl-figure {
    max-width: 1000px;
    margin: 24px auto 0;
}

.tpl-figure img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--border-color, #e3e8ef);
    border-radius: var(--radius-lg, 12px);
}

.tpl-figure figcaption {
    margin-top: 8px;
    color: var(--text-light, #667085);
    font-size: 0.8125rem;
    text-align: center;
}

.tpl-cases {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.tpl-case {
    padding: 22px 18px;
    border: 1px solid var(--border-color, #e3e8ef);
    border-radius: var(--radius-lg, 12px);
    background: #fff;
}

.tpl-case > i {
    margin-bottom: 12px;
    color: var(--blue-600, #0b4dd8);
    font-size: 1.5rem;
}

.tpl-case h3 {
    margin: 0 0 8px;
    font-size: 1.0625rem;
}

.tpl-case p {
    margin: 0 0 8px;
    color: var(--text-secondary, #344054);
    font-size: 0.9375rem;
    line-height: 1.65;
}

.tpl-case a {
    color: var(--blue-600, #0b4dd8);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
}

.tpl-steps {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.tpl-steps li {
    padding: 20px 16px;
    border: 1px solid var(--border-color, #e3e8ef);
    border-radius: var(--radius-lg, 12px);
    background: #fff;
}

.tpl-step-no {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--blue-600, #0b4dd8);
    font-size: 1.25rem;
    font-weight: 800;
}

.tpl-steps h3 {
    margin: 0 0 6px;
    font-size: 1.0625rem;
}

.tpl-steps p {
    margin: 0;
    color: var(--text-secondary, #344054);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.tpl-faq {
    max-width: 880px;
    margin: 24px auto 0;
}

.tpl-faq details {
    margin-bottom: 10px;
    border: 1px solid var(--border-color, #e3e8ef);
    border-radius: var(--radius-md, 8px);
    background: #fff;
}

.tpl-faq summary {
    padding: 16px 18px;
    cursor: pointer;
    font-size: 1.0625rem;
    font-weight: 700;
}

.tpl-faq details p {
    margin: 0;
    padding: 0 18px 18px;
    color: var(--text-secondary, #344054);
    line-height: 1.8;
}

/* ── 홈 파트너 배지 (.tpl-strip) ─────────────────────── */
.tpl-strip {
    padding: 18px 0;
    border-top: 1px solid var(--border-color, #e3e8ef);
    border-bottom: 1px solid var(--border-color, #e3e8ef);
    background: #fff;
}

.tpl-strip-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px 28px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.tpl-strip-logo {
    display: block;
    width: 130px;
    height: auto;
}

.tpl-strip-text {
    margin: 0;
    color: var(--text-secondary, #344054);
    font-size: 1rem;
    line-height: 1.6;
}

.tpl-strip-text strong {
    color: var(--text-primary, #101828);
}

.tpl-strip-link {
    padding: 8px 18px;
    border: 1px solid var(--blue-600, #0b4dd8);
    border-radius: 999px;
    color: var(--blue-600, #0b4dd8);
    font-size: 0.9375rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.tpl-strip-link:hover,
.tpl-strip-link:focus-visible {
    background: var(--blue-600, #0b4dd8);
    color: #fff;
}

/* ── 반응형 ────────────────────────────────────────── */
@media (max-width: 1100px) {
    .tpl-lines {
        grid-template-columns: repeat(2, 1fr);
    }

    .tpl-cases,
    .tpl-steps {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 820px) {
    .tpl-lines,
    .tpl-cases,
    .tpl-steps {
        grid-template-columns: 1fr;
    }
}


/* ═══════════════════════════════════════════════════════
 * 쇼핑몰형 화면 (.tps-*) — /sub/tp-link 목록, /sub/tp-link-product 상세
 * ═══════════════════════════════════════════════════════ */

/* 파트너 안내 띠 */
.tps-partner {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color, #e3e8ef);
    background: #fff;
}

.tps-partner-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 24px;
}

.tps-partner-logo {
    display: block;
    width: 105px;
    height: auto;
}

.tps-partner-text {
    flex: 1 1 320px;
    margin: 0;
    color: var(--text-secondary, #344054);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.tps-partner-text strong {
    color: var(--text-primary, #101828);
}

.tps-partner-link {
    padding: 8px 18px;
    border: 1px solid var(--blue-600, #0b4dd8);
    border-radius: 999px;
    color: var(--blue-600, #0b4dd8);
    font-size: 0.9375rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.tps-partner-link:hover,
.tps-partner-link:focus-visible {
    background: var(--blue-600, #0b4dd8);
    color: #fff;
}

/* 쇼핑 영역 */
.tps-shop {
    padding: 8px 0 48px;
}

.tps-shop-title {
    margin: 24px 0 8px;
    text-align: center;
}

.tps-version {
    margin: 8px 0 14px;
    color: var(--text-muted, #475467);
    font-size: 0.875rem;
}

/* 분류·검색 박스 */
.tps-filterbox {
    border: 1px solid var(--border-color, #e3e8ef);
    border-radius: var(--radius-lg, 12px);
    background: #fff;
    overflow: hidden;
}

.tps-row {
    display: flex;
    gap: 12px 16px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light, #eef1f5);
}

.tps-row:last-child {
    border-bottom: 0;
}

.tps-row-label {
    flex: 0 0 64px;
    padding-top: 7px;
    color: var(--blue-700, #0a3fb0);
    font-size: 0.875rem;
    font-weight: 800;
}

.tps-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

/* 카테고리·소분류는 이름 전체가 보이게 세로로 쌓는다. */
.tps-row-cat,
.tps-row-sub {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.tps-row-cat .tps-row-label,
.tps-row-sub .tps-row-label {
    flex: none;
    padding-top: 0;
}

.tps-row-cat .tps-chips,
.tps-row-sub .tps-chips {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 4px;
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
}

.tps-row-cat .tps-chip,
.tps-row-sub .tps-chip {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    border-radius: 8px;
    white-space: normal;
    line-height: 1.35;
}

.tps-chip {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid var(--border-color, #e3e8ef);
    border-radius: 999px;
    background: #fff;
    color: var(--text-secondary, #344054);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
}

.tps-chip-name {
    min-width: 0;
    font-weight: 600;
}

.tps-chip-n {
    flex: 0 0 auto;
    margin-left: 8px;
    color: var(--text-light, #667085);
    font-weight: 500;
}

.tps-chip:hover,
.tps-chip:focus-visible {
    border-color: var(--blue-500, #1e63f0);
    color: var(--blue-600, #0b4dd8);
}

.tps-chip.active {
    border-color: var(--blue-600, #0b4dd8);
    background: var(--blue-600, #0b4dd8);
    color: #fff;
}

.tps-chip.active .tps-chip-n {
    color: #dbe6ff;
}

.tps-chip-sub {
    padding: 4px 12px;
    font-size: 0.8125rem;
}

.tps-row-sub {
    background: var(--bg-light, #f5f7fa);
}

.tps-search {
    flex-wrap: wrap;
    align-items: flex-end;
    background: var(--bg-light, #f5f7fa);
}

.tps-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    color: var(--text-muted, #475467);
    font-size: 0.8125rem;
    font-weight: 700;
    text-align: left;
}

.tps-field input,
.tps-field select {
    padding: 8px 10px;
    border: 1px solid var(--border-color, #d0d5dd);
    border-radius: 6px;
    background: #fff;
    color: var(--text-primary, #101828);
    font-size: 0.9375rem;
}

.tps-field-q {
    flex: 1 1 260px;
}

.tps-range {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tps-range input {
    width: 112px;
}

.tps-range i {
    font-style: normal;
    color: var(--text-light, #667085);
}

.tps-search-btns {
    display: flex;
    gap: 8px;
}

.tps-count {
    margin: 10px 0 8px;
    color: var(--text-secondary, #344054);
    font-size: 0.9375rem;
}

.tps-count strong {
    color: #e5340b;
}

.tps-count-page {
    margin-left: 6px;
    color: var(--text-light, #667085);
    font-size: 0.8125rem;
}

.tps-shop-main {
    min-width: 0;
}

@media (min-width: 900px) {
    .tps-shop-layout {
        display: grid;
        grid-template-columns: 248px minmax(0, 1fr);
        gap: 16px 20px;
        align-items: start;
    }

    .tps-shop-layout .tps-filterbox {
        position: sticky;
        top: calc(var(--header-h, 76px) + 8px);
        z-index: 20;
        max-height: calc(100vh - var(--header-h, 76px) - 20px);
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .tps-shop-layout .tps-search {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .tps-shop-layout .tps-field,
    .tps-shop-layout .tps-field-q {
        flex: 0 0 auto;
        width: 100%;
    }

    .tps-shop-layout .tps-field input,
    .tps-shop-layout .tps-field select,
    .tps-shop-layout .tps-range {
        width: 100%;
        min-width: 0;
    }

    .tps-shop-layout .tps-range input {
        flex: 1 1 0;
        width: auto;
        min-width: 0;
    }

    .tps-shop-layout .tps-search-btns {
        width: 100%;
    }

    .tps-shop-layout .tps-search-btns .btn {
        flex: 1 1 0;
    }
}

/* 헤더(1320)보다 넓게. 노트북은 양옆 20px, 큰 화면은 1840에서 멈춘다. */
.container.mall-bleed {
    width: 100%;
    max-width: 1840px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

@media (min-width: 900px) {
    .container.mall-bleed {
        width: min(1840px, calc(100% - 40px));
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* 제품 카드 그리드: 오픈마켓형, 사진이 칸의 대부분 */
.tps-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.tps-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid #ededed;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
    transition: box-shadow 0.15s, border-color 0.15s;
}

.tps-card:hover {
    border-color: var(--blue-500, #1e63f0);
    box-shadow: var(--shadow-md, 0 4px 10px -2px rgba(16, 24, 40, 0.08));
}

.tps-card-img {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    background: #fff;
}

.tps-card-img img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 4px;
    box-sizing: border-box;
    object-fit: contain;
    background: #fff;
}

.tps-card-img.is-placeholder,
.tps-detail-img.is-placeholder {
    background: var(--bg-light, #f5f7fa);
}

.tps-card-img.is-placeholder img {
    padding: 18%;
    opacity: 0.85;
}

.tps-badge-new {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #067647;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
}

.tps-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 8px 10px 10px;
    border-top: 1px solid #f2f4f7;
}

.tps-card-group {
    margin: 0 0 4px;
    color: var(--text-light, #667085);
    font-size: 0.75rem;
}

.tps-card-name {
    display: -webkit-box;
    margin: 0 0 4px;
    overflow: hidden;
    font-size: 0.875rem;
    line-height: 1.35;
    word-break: keep-all;
    overflow-wrap: anywhere;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tps-card-name a {
    color: var(--text-primary, #101828);
    text-decoration: none;
}

.tps-card-name a:hover {
    color: var(--blue-600, #0b4dd8);
}

.tps-card-spec {
    display: -webkit-box;
    margin: 0 0 8px;
    overflow: hidden;
    color: var(--text-secondary, #344054);
    font-size: 0.8125rem;
    line-height: 1.45;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.tps-card-price {
    margin: auto 0 10px;
    color: var(--text-primary, #101828);
}

.tps-price-label {
    color: var(--text-light, #667085);
    font-size: 0.75rem;
    font-weight: 500;
}

.tps-card-price strong {
    color: #e11d2e;
    font-size: 1.25rem;
    font-weight: 800;
}

.tps-detail-price strong {
    color: #e11d2e;
    font-size: 1.75rem;
    font-weight: 800;
}

.tps-price-note {
    display: block;
    color: var(--text-muted, #475467);
    font-size: 0.75rem;
    font-weight: 500;
}

.tps-price-quote {
    font-size: 0.9375rem;
    font-weight: 700;
}

.tps-filter-more > summary {
    display: none;
}

@media (min-width: 821px) {
    .tps-filter-more > .tps-search {
        display: flex !important;
    }
}

.tps-parts-scroll {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 16px 0 8px;
    overflow-x: auto;
}

.tps-parts {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

.tps-parts th,
.tps-parts td {
    padding: 10px 8px;
    border-bottom: 1px solid #e4e7ec;
    text-align: left;
    vertical-align: top;
}

.tps-parts th {
    color: #667085;
    font-size: 0.75rem;
    font-weight: 600;
}

.tps-parts .num {
    text-align: right;
    white-space: nowrap;
}

.tps-add {
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--blue-600, #0b4dd8);
    border-radius: 8px;
    background: #fff;
    color: var(--blue-600, #0b4dd8);
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
}

.tps-add:hover,
.tps-add:focus-visible {
    background: var(--blue-600, #0b4dd8);
    color: #fff;
}

.tps-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px;
}

.tps-actions .tps-add,
.tps-actions .tps-buy-now {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    min-height: 44px;
}

.tps-buy-now {
    min-height: 44px;
    padding: 10px 14px;
    border: 0;
    border-radius: 8px;
    background: var(--blue-600, #0b4dd8);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
}

.tps-buy-now:hover,
.tps-buy-now:focus-visible {
    background: var(--blue-700, #0a3fb0);
}

.tpl-buy {
    margin: 4px 0 16px;
    padding: 16px 16px 4px;
    border: 1px solid var(--border-color, #d0d5dd);
    border-radius: var(--radius-md, 8px);
    background: #fff;
}

.tpl-buy[hidden] {
    display: none;
}

.tpl-buy legend {
    float: none;
    width: auto;
    margin: 0 0 6px;
    padding: 0;
    color: var(--text-primary, #101828);
    font-size: 0.9375rem;
    font-weight: 800;
}

.tpl-addr-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.tpl-addr-row .form-control {
    max-width: 140px;
}

.tps-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary, #344054);
}

.tps-pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 28px 0 8px;
}

/* 페이지 번호 버튼만. main.tps-page 처럼 본문에 붙이면 문장이 가운데로 정렬된다. */
.tps-pager .tps-page {
    min-width: 38px;
    padding: 8px 12px;
    border: 1px solid var(--border-color, #e3e8ef);
    border-radius: 8px;
    background: #fff;
    color: var(--text-secondary, #344054);
    font-size: 0.9375rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}

.tps-pager .tps-page:hover,
.tps-pager .tps-page:focus-visible {
    border-color: var(--blue-500, #1e63f0);
    color: var(--blue-600, #0b4dd8);
}

.tps-pager .tps-page.active {
    border-color: var(--blue-600, #0b4dd8);
    background: var(--blue-600, #0b4dd8);
    color: #fff;
}

.tps-page-gap {
    padding: 8px 4px;
    color: var(--text-light, #667085);
}

/* 상세 */
.tps-product-header {
    padding-bottom: 24px;
}

.tps-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    gap: 24px;
    align-items: start;
}

.tps-detail-img {
    position: relative;
    border: 1px solid var(--border-color, #e3e8ef);
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
}

.tps-detail-img img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

.tps-detail-visual {
    min-width: 0;
}

.tps-thumb-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
}

.tps-thumb-nav {
    display: flex;
    flex: 0 0 28px;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 64px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #98a2b3;
    cursor: pointer;
}

.tps-thumb-nav:hover,
.tps-thumb-nav:focus-visible {
    color: #344054;
}

.tps-thumb-nav[hidden] {
    display: none;
}

.tps-thumbs {
    display: flex;
    gap: 8px;
    min-width: 0;
    flex: 1;
    margin-top: 0;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.tps-thumbs::-webkit-scrollbar {
    display: none;
}

.tps-thumb,
.tps-thumb-more {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    padding: 2px;
    border: 1px solid #d0d5dd;
    border-radius: 2px;
    background: #fff;
    cursor: pointer;
}

.tps-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tps-thumb.is-on,
.tps-thumb:focus-visible {
    border-color: #12b76a;
    box-shadow: inset 0 0 0 1px #12b76a;
}

.tps-thumbs-card {
    display: none;
}

.tps-thumbs-card .tps-thumb,
.tps-thumbs-card .tps-thumb-more {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
}

.tps-thumb-more {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary, #344054);
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
}

.tps-gallery {
    display: grid;
    gap: 12px;
}

.tps-gallery img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--border-color, #e3e8ef);
    border-radius: var(--radius-lg, 12px);
    background: #fff;
}

.tps-detail-img.is-placeholder img {
    padding: 22%;
}

.tps-img-note {
    margin: 0;
    padding: 10px 14px;
    border-top: 1px solid var(--border-light, #eef1f5);
    color: var(--text-muted, #475467);
    font-size: 0.8125rem;
    text-align: center;
}

.tps-detail-group {
    margin: 0 0 6px;
    color: var(--text-muted, #475467);
    font-size: 0.875rem;
}

.tps-detail-group a {
    color: var(--blue-600, #0b4dd8);
    font-weight: 700;
    text-decoration: none;
}

.tps-detail-title {
    margin: 0 0 8px;
    font-size: 1.75rem;
    line-height: 1.3;
    word-break: break-all;
}

.tps-detail-spec {
    margin: 0 0 18px;
    color: var(--text-secondary, #344054);
    line-height: 1.7;
}

.tps-detail-price {
    margin: 0;
    padding: 14px 16px;
    border-top: 2px solid var(--text-primary, #101828);
    background: var(--bg-light, #f5f7fa);
}

.tps-detail-price strong {
    margin-left: 8px;
    font-size: 1.625rem;
}

.tps-detail-note {
    margin: 8px 0 14px;
    color: var(--text-muted, #475467);
    font-size: 0.8125rem;
    line-height: 1.6;
}

.tps-meta {
    margin: 0 0 18px;
    border-top: 1px solid var(--border-color, #e3e8ef);
}

.tps-meta > div {
    display: flex;
    gap: 16px;
    padding: 10px 4px;
    border-bottom: 1px solid var(--border-light, #eef1f5);
    font-size: 0.9375rem;
}

.tps-meta dt {
    flex: 0 0 72px;
    color: var(--text-muted, #475467);
    font-weight: 600;
}

.tps-meta dd {
    margin: 0;
    color: var(--text-primary, #101828);
}

.tps-buy {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.tps-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-color, #d0d5dd);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.tps-qty button {
    width: 40px;
    height: 46px;
    border: 0;
    background: #fff;
    color: var(--text-primary, #101828);
    font-size: 1.125rem;
    cursor: pointer;
}

.tps-qty button:hover {
    background: var(--bg-light, #f5f7fa);
}

.tps-qty input {
    width: 56px;
    height: 46px;
    border: 0;
    border-right: 1px solid var(--border-light, #eef1f5);
    border-left: 1px solid var(--border-light, #eef1f5);
    text-align: center;
    font-size: 1rem;
    -moz-appearance: textfield;
}

.tps-qty input::-webkit-outer-spin-button,
.tps-qty input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.tps-detail-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 14px 0 0;
}

.tps-detail-links a {
    color: var(--blue-600, #0b4dd8);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
}

.tps-detail-links a:hover {
    text-decoration: underline;
}

.tps-block {
    margin-top: 44px;
}

.tps-tabbar {
    display: flex;
    position: sticky;
    top: var(--header-h, 72px);
    z-index: 30;
    margin: 28px 0 18px;
    background: #f3f4f6;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    overflow-x: auto;
    scrollbar-width: none;
}

.tps-tabbar::-webkit-scrollbar {
    display: none;
}

.tps-tab {
    flex: 1 0 auto;
    min-width: 118px;
    margin: 0;
    padding: 14px 16px;
    border: 0;
    background: transparent;
    color: #4b5563;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    cursor: pointer;
}

.tps-tab.is-on {
    background: #00a86b;
    color: #fff;
}

.tps-tab:focus-visible {
    outline: 2px solid #0b4dd8;
    outline-offset: -2px;
}

.tps-highlight-lead {
    margin: 0 0 14px;
    color: #344054;
    font-size: 1.0625rem;
    line-height: 1.6;
}

.tps-highlights {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.tps-highlight {
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.tps-highlight h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.tps-highlight p {
    margin: 0;
    color: #344054;
    line-height: 1.6;
}

.tps-sheet {
    display: block;
    width: 100%;
    height: auto;
    background: #fff;
}

.tps-support {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 16px;
}

.tps-support article {
    padding: 16px;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.tps-support h3 {
    margin: 0 0 8px;
    font-size: 1.0625rem;
}

.tps-support p {
    margin: 0 0 6px;
    color: #344054;
    line-height: 1.55;
}

.tps-support a {
    color: #0b4dd8;
    font-weight: 700;
}

.tps-block > h2 {
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--text-primary, #101828);
    font-size: 1.25rem;
}

.tps-spec-table {
    width: 100%;
    border-collapse: collapse;
    border-top: 1px solid var(--border-color, #e3e8ef);
}

.tps-spec-table th,
.tps-spec-table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border-light, #eef1f5);
    color: var(--text-primary, #101828);
    font-size: 0.9375rem;
    text-align: left;
    vertical-align: top;
}

.tps-spec-table th {
    width: 150px;
    background: var(--bg-light, #f5f7fa);
    color: var(--text-muted, #475467);
    font-weight: 700;
}

.tps-spec-group {
    margin: 22px 0 8px;
    font-size: 1.0625rem;
}

.tps-spec-full th {
    width: 240px;
}

.tps-spec-full td {
    white-space: pre-line;
}

.tps-guide {
    margin: 0;
    padding-left: 20px;
    color: var(--text-secondary, #344054);
    line-height: 1.85;
}

.tps-grid-related {
    grid-template-columns: repeat(4, 1fr);
}

/* 견적 장바구니 하단 바 / 토스트 */
.tps-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 10px 16px;
    background: #0d1b2e;
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
}

.tps-bar[hidden],
.tps-toast[hidden] {
    display: none;
}

.tps-toast {
    position: fixed;
    left: 50%;
    bottom: 72px;
    z-index: 950;
    max-width: calc(100vw - 32px);
    padding: 10px 18px;
    border-radius: 999px;
    background: #101828;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    transform: translateX(-50%);
}

/* 문의 유형(견적 / 프로젝트) + 프로젝트 정보 */
.tpl-kind {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 0 0 18px;
    padding: 0;
    border: 0;
}

.tpl-kind-opt {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--border-color, #d0d5dd);
    border-radius: var(--radius-md, 8px);
    background: #fff;
    cursor: pointer;
}

.tpl-kind-opt:has(input:checked) {
    border-color: var(--blue-600, #0b4dd8);
    background: var(--blue-50, #eaf1ff);
}

.tpl-kind-opt input {
    margin-top: 4px;
}

.tpl-kind-opt strong {
    display: block;
    color: var(--text-primary, #101828);
    font-size: 0.9375rem;
}

.tpl-kind-opt small {
    display: block;
    margin-top: 2px;
    color: var(--text-muted, #475467);
    font-size: 0.8125rem;
    line-height: 1.5;
}

.tpl-project {
    margin: 4px 0 16px;
    padding: 16px 16px 4px;
    border: 1px solid var(--blue-500, #1e63f0);
    border-radius: var(--radius-md, 8px);
    background: var(--blue-50, #eaf1ff);
}

.tpl-project[hidden] {
    display: none;
}

.tpl-project legend {
    float: none;
    width: auto;
    margin: 0 0 6px;
    padding: 0 8px;
    color: var(--blue-700, #0a3fb0);
    font-size: 0.9375rem;
    font-weight: 800;
}

.tpl-line-link-ext {
    margin-top: 6px;
    color: var(--text-muted, #475467);
    font-size: 0.8125rem;
}

@media (min-width: 821px) {
    body:has(.tpl-page) .cta-buttons {
        right: 16px;
        bottom: 16px;
        flex-direction: row;
        gap: 8px;
    }

    body:has(.tpl-page) .btn-back-to-top {
        right: auto;
        left: 16px;
        bottom: 16px;
    }
}

@media (max-width: 1100px) {
    .tps-grid,
    .tps-grid-related {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 900px) and (max-width: 1280px) {
    .tps-shop-layout .tps-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 900px) and (max-width: 1040px) {
    .tps-shop-layout .tps-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .tps-shop {
        padding-bottom: 108px;
    }

    .tps-grid,
    .tps-grid-related {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .tps-card:has(.tps-card-img) {
        flex-direction: row;
        align-items: stretch;
    }

    .tps-card-img {
        flex: 0 0 112px;
        width: 112px;
        min-height: 112px;
        aspect-ratio: auto;
        border-right: 1px solid #f2f4f7;
    }

    .tps-card-img img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        padding: 6px;
    }

    .tps-card-body {
        min-width: 0;
        padding: 8px 10px 10px;
        border-top: 0;
    }

    .tps-card-spec {
        display: -webkit-box;
        margin-bottom: 6px;
        font-size: 0.8125rem;
        -webkit-line-clamp: 3;
    }

    .tps-card:not(:has(.tps-card-img)) .tps-card-spec {
        display: -webkit-box;
    }

    .tps-card-group {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .tps-card-name {
        font-size: 0.9375rem;
        -webkit-line-clamp: 2;
    }

    .tps-card-price {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 4px 6px;
        margin: 2px 0 8px;
    }

    .tps-card-price strong {
        font-size: 1.125rem;
    }

    .tps-actions .tps-add,
    .tps-actions .tps-buy-now {
        flex: 1 1 0;
        min-height: 44px;
        padding: 8px 8px;
        font-size: 0.8125rem;
        white-space: nowrap;
    }

    .tps-filter-more > summary {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 12px 14px;
        background: var(--bg-light, #f5f7fa);
        color: var(--blue-700, #0a3fb0);
        font-size: 0.875rem;
        font-weight: 800;
        cursor: pointer;
        list-style: none;
    }

    .tps-filter-more > summary::-webkit-details-marker {
        display: none;
    }

    .tps-filter-more > summary::before {
        content: "";
        width: 8px;
        height: 8px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: rotate(45deg);
        margin-top: -4px;
    }

    .tps-filter-more[open] > summary::before {
        transform: rotate(225deg);
        margin-top: 3px;
    }

    .tps-row-label {
        flex: 0 0 auto;
        padding-top: 0;
        white-space: nowrap;
    }

    .tps-search {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 12px;
    }

    .tps-field,
    .tps-row-label {
        text-align: left;
    }

    .tps-field-q {
        flex-basis: auto;
    }

    .tps-chips {
        gap: 6px;
    }

    .tps-chip {
        padding: 5px 11px;
        font-size: 0.8125rem;
    }

    .tps-range input {
        flex: 1 1 0;
        width: auto;
        min-width: 0;
    }

    .tps-search-btns {
        width: 100%;
    }

    .tps-search-btns .btn {
        flex: 1;
    }

    .tpl-page .page-header h1 {
        font-size: 1.625rem !important;
        line-height: 1.3 !important;
        text-wrap: wrap;
        overflow-wrap: anywhere;
    }

    .tpl-page .page-header p {
        font-size: 0.9375rem !important;
        text-wrap: wrap;
        overflow-wrap: anywhere;
    }

    .tps-detail {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .tps-detail > * {
        min-width: 0;
    }

    .tps-detail-title {
        font-size: 1.5rem;
    }

    .tps-buy .btn {
        flex: 1 1 140px;
    }

    .tps-highlights,
    .tps-support {
        grid-template-columns: minmax(0, 1fr);
    }

    .tpl-kind {
        grid-template-columns: minmax(0, 1fr);
    }

    .tps-parts {
        min-width: 480px;
    }

    .tps-spec-table th {
        width: 96px;
    }

    .tpl-page .page-header {
        padding: calc(var(--header-h, 64px) + 10px) 0 12px;
    }

    .tpl-page .tps-partner {
        display: none;
    }

    .tps-version {
        display: -webkit-box;
        overflow: hidden;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    body:has(.tpl-page) .cta-buttons {
        left: 10px;
        right: auto;
        bottom: 12px;
        flex-direction: row;
    }

    body:has(.tpl-page) .btn-back-to-top {
        left: 10px;
        right: auto;
        bottom: 70px;
    }
}

@media (max-width: 520px) {
    .tps-card-img {
        flex-basis: 96px;
        width: 96px;
    }

    .tps-card-name {
        -webkit-line-clamp: 2;
    }

    .tps-actions {
        flex-direction: row;
    }

    .tps-actions .tps-add,
    .tps-actions .tps-buy-now {
        flex: 1 1 0;
        width: auto;
    }

    .tps-parts {
        min-width: 0;
    }

    .tps-parts th,
    .tps-parts td {
        padding: 8px 6px;
    }
}

/* 목록은 한 줄(사진 · 설명 · 가격·배송·버튼). 관련 상품 격자는 .tps-grid 그대로. */
.tps-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin: 0 0 10px;
    padding: 10px 12px;
    border: 1px solid var(--border-color, #e3e8ef);
    border-radius: 8px;
    background: #fff;
    min-width: 0;
    max-width: 100%;
}

.tps-toolbar-search {
    display: flex;
    flex: 1 1 280px;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.tps-toolbar-search input[type="search"] {
    flex: 1 1 auto;
    min-width: 0;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border-color, #d0d5dd);
    border-radius: 6px;
    background: #fff;
    color: var(--text-primary, #101828);
    font-size: 0.9375rem;
}

.tps-toolbar-search .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.tps-sorts {
    display: flex;
    flex: 1 1 280px;
    gap: 2px;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
}

.tps-sort {
    flex: 0 0 auto;
    padding: 8px 12px;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary, #344054);
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.tps-sort:hover,
.tps-sort:focus-visible {
    color: #e11d2e;
}

.tps-sort.active {
    border-bottom-color: #e11d2e;
    color: #e11d2e;
}

.tps-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.tps-list > .tps-card {
    flex-direction: row;
    align-items: stretch;
}

.tps-list > .tps-card > .tps-card-img {
    flex: 0 0 168px;
    width: 168px;
    min-height: 148px;
    aspect-ratio: auto;
    align-self: stretch;
    border-right: 1px solid #f2f4f7;
}

.tps-list > .tps-card > .tps-card-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 8px;
}

.tps-list .tps-card-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 8px 18px;
    align-items: center;
    border-top: 0;
    padding: 14px 16px;
}

.tps-list .tps-card-copy {
    min-width: 0;
}

.tps-list .tps-card-name {
    font-size: 1.0625rem;
    -webkit-line-clamp: 2;
}

.tps-list .tps-card-spec {
    -webkit-line-clamp: 2;
    margin-bottom: 0;
}

.tps-list .tps-card-buy {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    min-width: 0;
}

.tps-list .tps-card-price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: flex-end;
    gap: 4px 6px;
    margin: 0;
    text-align: right;
}

.tps-list .tps-card-price strong {
    font-size: 1.5rem;
}

.tps-list .tps-card-price .tps-price-quote {
    font-size: 1.0625rem;
}

.tps-card-ship {
    margin: 0;
    color: #067647;
    font-size: 0.8125rem;
    font-weight: 700;
    text-align: right;
}

.tps-card-ship.is-fee {
    color: var(--text-muted, #475467);
    font-weight: 600;
}

.tps-list .tps-actions {
    flex-direction: column;
}

.tps-list .tps-actions .tps-add,
.tps-list .tps-actions .tps-buy-now {
    flex: 0 0 auto;
    width: 100%;
}

@media (min-width: 900px) and (max-width: 1100px) {
    .tps-list > .tps-card > .tps-card-img {
        flex-basis: 128px;
        width: 128px;
        min-height: 128px;
    }

    .tps-list .tps-card-body {
        grid-template-columns: minmax(0, 1fr) 168px;
        gap: 8px 12px;
        padding: 10px 12px;
    }

    .tps-list .tps-card-price strong {
        font-size: 1.25rem;
    }
}

@media (max-width: 820px) {
    .tps-toolbar {
        align-items: stretch;
    }

    .tps-toolbar-search {
        flex-basis: 100%;
    }

    .tps-list > .tps-card > .tps-card-img {
        flex-basis: 104px;
        width: 104px;
        min-height: 104px;
    }

    .tps-list .tps-card-body {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        padding: 8px 10px;
    }

    .tps-list .tps-card-price,
    .tps-list .tps-card-ship {
        justify-content: flex-start;
        text-align: left;
    }

    .tps-list .tps-card-price strong {
        font-size: 1.25rem;
    }

    .tps-list .tps-actions {
        flex-direction: row;
    }

    .tps-list .tps-actions .tps-add,
    .tps-list .tps-actions .tps-buy-now {
        flex: 1 1 0;
        width: auto;
    }
}
