/* ==========================================================================
   Tong Portfolio Filter — Toss-style Design System
   ========================================================================== */

:root {
    --tpf-blue: #3182F6;
    --tpf-blue-light: #E8F3FF;
    --tpf-blue-dark: #1B64DA;
    --tpf-red: #F04452;
    --tpf-green: #30B47A;
    --tpf-white: #FFFFFF;

    --tpf-gray-50: #F9FAFB;
    --tpf-gray-100: #F2F4F6;
    --tpf-gray-200: #E5E8EB;
    --tpf-gray-300: #D1D6DB;
    --tpf-gray-400: #B0B8C1;
    --tpf-gray-500: #8B95A1;
    --tpf-gray-600: #6B7684;
    --tpf-gray-700: #4E5968;
    --tpf-gray-800: #333D4B;
    --tpf-gray-900: #191F28;

    --tpf-font: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, Roboto, sans-serif;
    --tpf-radius-sm: 8px;
    --tpf-radius-md: 12px;
    --tpf-radius-lg: 16px;
    --tpf-radius-full: 9999px;

    --tpf-shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --tpf-shadow-md: 0 4px 12px rgba(0,0,0,0.06);
    --tpf-shadow-lg: 0 8px 28px rgba(0,0,0,0.1);
    --tpf-shadow-xl: 0 16px 48px rgba(0,0,0,0.12);

    --tpf-transition: 0.2s ease;
    --tpf-transition-slow: 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    --tpf-sidebar-width: 280px;
}

/* ==========================================================================
   레이아웃
   ========================================================================== */
.tpf-filter-grid {
    display: flex;
    gap: 32px;
    font-family: var(--tpf-font);
    max-width: 1400px;
    margin: 0 auto;
    color: var(--tpf-gray-900);
    -webkit-font-smoothing: antialiased;
}

.tpf-layout-sidebar .tpf-filter-sidebar {
    flex: 0 0 var(--tpf-sidebar-width);
    position: sticky;
    top: 100px;
    align-self: flex-start;
}

.tpf-layout-sidebar .tpf-grid-main { flex: 1; min-width: 0; }

/* Sidebar-Accordion Layout */
.tpf-layout-sidebar-accordion .tpf-filter-sidebar {
    flex: 0 0 var(--tpf-sidebar-width);
    position: sticky;
    top: 100px;
    align-self: flex-start;
}

.tpf-layout-sidebar-accordion .tpf-grid-main {
    flex: 1;
    min-width: 0;
}

.tpf-layout-topbar { flex-direction: column; }
.tpf-layout-topbar .tpf-filter-sidebar { width: 100%; position: relative; }
.tpf-layout-topbar .tpf-filter-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
}
.tpf-layout-topbar .tpf-filter-section { flex: 1; min-width: 200px; margin-bottom: 0; }
.tpf-layout-topbar .tpf-search-input {
    height: 42px;
    background: var(--tpf-white);
    border: 1.5px solid var(--tpf-gray-200);
    border-radius: var(--tpf-radius-sm);
}
.tpf-layout-topbar .tpf-search-input:focus {
    border-color: var(--tpf-blue);
    box-shadow: 0 0 0 2px rgba(49, 130, 246, 0.12);
    background: var(--tpf-white);
}
.tpf-layout-topbar .tpf-filter-header { margin-bottom: 8px; }
.tpf-layout-topbar .tpf-filter-reset {
    flex: 0 0 auto;
    min-width: auto;
    align-self: flex-end;
}
.tpf-layout-topbar .tpf-reset-all {
    width: auto;
    padding: 10px 0;
    background: none;
    border: none;
    border-radius: 0;
    font-size: 13px;
    color: var(--tpf-gray-500);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.tpf-layout-topbar .tpf-reset-all:hover {
    color: var(--tpf-blue);
    background: none;
}

/* ==========================================================================
   필터 사이드바
   ========================================================================== */
.tpf-filter-sidebar {
    background: var(--tpf-white);
    border-radius: var(--tpf-radius-lg);
    box-shadow: var(--tpf-shadow-md);
    padding: 24px;
}

.tpf-filter-section {
    margin-bottom: 28px;
}

.tpf-filter-section:last-child { margin-bottom: 0; }

.tpf-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.tpf-filter-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--tpf-gray-900);
    letter-spacing: -0.2px;
}

.tpf-clear-section {
    background: none;
    border: none;
    color: var(--tpf-gray-500);
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    font-family: var(--tpf-font);
    transition: var(--tpf-transition);
}

.tpf-clear-section:hover { color: var(--tpf-blue); }

/* 검색 */
.tpf-search-wrap {
    position: relative;
}

.tpf-search-input {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border: none;
    border-radius: var(--tpf-radius-full);
    background: var(--tpf-gray-100);
    font-size: 14px;
    font-family: var(--tpf-font);
    color: var(--tpf-gray-900);
    transition: var(--tpf-transition);
    box-sizing: border-box;
    outline: none;
}

.tpf-search-input::placeholder { color: var(--tpf-gray-400); }

.tpf-search-input:focus {
    background: var(--tpf-white);
    box-shadow: 0 0 0 2px var(--tpf-blue);
}


/* 체크박스 — 토스 스타일 */
.tpf-filter-list ul { list-style: none; margin: 0; padding: 0; }
.tpf-filter-list li { margin-bottom: 2px; }

.tpf-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px;
    cursor: pointer;
    border-radius: var(--tpf-radius-sm);
    transition: var(--tpf-transition);
    font-size: 14px;
    color: var(--tpf-gray-800);
    user-select: none;
}

.tpf-checkbox-label:hover { background: var(--tpf-gray-50); }

.tpf-filter-checkbox { display: none; }

.tpf-check-box {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid var(--tpf-gray-300);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--tpf-transition);
    background: var(--tpf-white);
}

.tpf-check-box svg { opacity: 0; transition: var(--tpf-transition); stroke: var(--tpf-white); }

.tpf-filter-checkbox:checked + .tpf-check-box {
    background: var(--tpf-blue);
    border-color: var(--tpf-blue);
}

.tpf-filter-checkbox:checked + .tpf-check-box svg { opacity: 1; }

.tpf-term-name { flex: 1; font-weight: 500; }

.tpf-term-count {
    color: var(--tpf-gray-400);
    font-size: 12px;
    font-weight: 500;
    min-width: 20px;
    text-align: right;
}

/* 카테고리 트리 */
.tpf-category-tree .tpf-sub-categories { padding-left: 24px; }

.tpf-cat-item { position: relative; }

.tpf-toggle-children {
    position: absolute;
    right: 4px;
    top: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--tpf-gray-400);
    padding: 4px;
    border-radius: var(--tpf-radius-sm);
    transition: var(--tpf-transition);
    line-height: 0;
}

.tpf-toggle-children:hover { background: var(--tpf-gray-100); color: var(--tpf-gray-700); }
.tpf-toggle-children[aria-expanded="false"] svg { transform: rotate(-90deg); }
.tpf-toggle-children[aria-expanded="false"] + .tpf-sub-categories { display: none; }

/* 드롭다운 필터 (브랜드/태그) */
.tpf-dropdown-filter {
    position: relative;
}

.tpf-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    background: var(--tpf-white);
    border: 1.5px solid var(--tpf-gray-200);
    border-radius: var(--tpf-radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--tpf-gray-700);
    cursor: pointer;
    font-family: var(--tpf-font);
    transition: var(--tpf-transition);
    box-sizing: border-box;
}

.tpf-dropdown-toggle:hover { border-color: var(--tpf-gray-300); }

.tpf-dropdown-toggle.open {
    border-color: var(--tpf-blue);
    box-shadow: 0 0 0 2px rgba(49, 130, 246, 0.12);
}

.tpf-dropdown-label { flex: 1; text-align: left; }

.tpf-dropdown-count {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--tpf-blue);
    color: var(--tpf-white);
    font-size: 11px;
    font-weight: 700;
    border-radius: var(--tpf-radius-full);
    line-height: 1;
}

.tpf-dropdown-chevron {
    flex-shrink: 0;
    color: var(--tpf-gray-400);
    transition: transform var(--tpf-transition);
    line-height: 0;
}

.tpf-dropdown-toggle.open .tpf-dropdown-chevron {
    transform: rotate(180deg);
}

.tpf-dropdown-panel {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--tpf-white);
    border: 1px solid var(--tpf-gray-200);
    border-radius: var(--tpf-radius-md);
    box-shadow: var(--tpf-shadow-lg);
    z-index: 100;
    overflow: hidden;
}

.tpf-dropdown-panel.open { display: block; }

.tpf-dropdown-search-wrap {
    padding: 10px 12px 6px;
    border-bottom: 1px solid var(--tpf-gray-100);
}

.tpf-dropdown-search {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    border: 1.5px solid var(--tpf-gray-200);
    border-radius: var(--tpf-radius-sm);
    background: var(--tpf-gray-50);
    font-size: 13px;
    font-family: var(--tpf-font);
    color: var(--tpf-gray-900);
    transition: var(--tpf-transition);
    box-sizing: border-box;
    outline: none;
}

.tpf-dropdown-search::placeholder { color: var(--tpf-gray-400); }

.tpf-dropdown-search:focus {
    border-color: var(--tpf-blue);
    background: var(--tpf-white);
    box-shadow: 0 0 0 2px rgba(49, 130, 246, 0.1);
}

.tpf-dropdown-list {
    padding: 6px 4px;
}

.tpf-dropdown-list .tpf-checkbox-label {
    padding: 7px 8px;
    font-size: 13px;
}

.tpf-dropdown-list::-webkit-scrollbar { width: 4px; }
.tpf-dropdown-list::-webkit-scrollbar-track { background: transparent; }
.tpf-dropdown-list::-webkit-scrollbar-thumb { background: var(--tpf-gray-200); border-radius: 4px; }

/* topbar 레이아웃 — 풀폭 메가메뉴 */
.tpf-layout-topbar .tpf-dropdown-filter {
    position: static;
}

.tpf-layout-topbar .tpf-dropdown-panel {
    left: 0;
    right: 0;
    top: auto;
    margin-top: 8px;
}

.tpf-layout-topbar .tpf-dropdown-search-wrap {
    padding: 14px 16px 10px;
}

.tpf-layout-topbar .tpf-dropdown-search {
    height: 40px;
    font-size: 14px;
    padding: 0 14px;
}

.tpf-layout-topbar .tpf-dropdown-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    max-height: 360px;
    padding: 8px 12px;
    gap: 0;
}

.tpf-layout-topbar .tpf-dropdown-list .tpf-checkbox-label {
    padding: 6px 8px;
}

/* Accordion Mode — Inline Expansion (override dropdown overlay) */
.tpf-layout-sidebar-accordion .tpf-dropdown-panel {
    position: static;  /* Remove absolute positioning */
    display: none;
    margin-top: 8px;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0;
    background: transparent;
}

.tpf-layout-sidebar-accordion .tpf-dropdown-panel.open {
    display: block;
    animation: tpf-accordion-slide 0.3s ease-out;
}

@keyframes tpf-accordion-slide {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 400px;
    }
}

/* Accordion chevron rotation */
.tpf-layout-sidebar-accordion .tpf-dropdown-toggle .tpf-dropdown-chevron {
    transition: transform var(--tpf-transition);
}

.tpf-layout-sidebar-accordion .tpf-dropdown-toggle:not(.open) .tpf-dropdown-chevron {
    transform: rotate(-90deg);  /* Point right when closed */
}

.tpf-layout-sidebar-accordion .tpf-dropdown-toggle.open .tpf-dropdown-chevron {
    transform: rotate(0deg);  /* Point down when open */
}

/* Adjust search wrap styling */
.tpf-layout-sidebar-accordion .tpf-dropdown-search-wrap {
    padding: 8px 0 6px;
    border-bottom: 1px solid var(--tpf-gray-100);
    margin-bottom: 6px;
}

.tpf-layout-sidebar-accordion .tpf-dropdown-list {
    padding: 0;
}

/* Adjust toggle button styling */
.tpf-layout-sidebar-accordion .tpf-dropdown-toggle {
    background: var(--tpf-gray-50);
    border: none;
    padding: 12px 14px;
}

.tpf-layout-sidebar-accordion .tpf-dropdown-toggle:hover {
    background: var(--tpf-gray-100);
}

.tpf-layout-sidebar-accordion .tpf-dropdown-toggle.open {
    background: var(--tpf-gray-100);
    box-shadow: none;
    border: none;
}

/* 전체 필터 초기화 */
.tpf-reset-all {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--tpf-gray-50);
    border: none;
    border-radius: var(--tpf-radius-md);
    font-size: 14px;
    font-weight: 600;
    color: var(--tpf-gray-600);
    cursor: pointer;
    transition: var(--tpf-transition);
    font-family: var(--tpf-font);
}

.tpf-reset-all:hover { background: var(--tpf-gray-100); color: var(--tpf-gray-900); }

/* 모바일 필터 토글 */
.tpf-mobile-filter-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--tpf-gray-900);
    color: var(--tpf-white);
    border: none;
    border-radius: var(--tpf-radius-full);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--tpf-font);
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    box-shadow: var(--tpf-shadow-xl);
}

/* ==========================================================================
   그리드 툴바
   ========================================================================== */
.tpf-grid-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.tpf-result-count {
    font-size: 14px;
    color: var(--tpf-gray-600);
}

.tpf-found-posts {
    font-weight: 700;
    color: var(--tpf-gray-900);
    margin-right: 2px;
}

.tpf-sort-select {
    padding: 8px 16px;
    border: 1px solid var(--tpf-gray-200);
    border-radius: var(--tpf-radius-full);
    font-size: 13px;
    font-family: var(--tpf-font);
    color: var(--tpf-gray-700);
    background: var(--tpf-white);
    cursor: pointer;
    outline: none;
    transition: var(--tpf-transition);
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7684' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.tpf-sort-select:hover { border-color: var(--tpf-gray-300); }
.tpf-sort-select:focus { border-color: var(--tpf-blue); box-shadow: 0 0 0 2px rgba(49, 130, 246, 0.12); }

/* 활성 필터 칩 */
.tpf-active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.tpf-active-filters-list { display: flex; flex-wrap: wrap; gap: 6px; }

.tpf-active-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--tpf-blue-light);
    border: none;
    border-radius: var(--tpf-radius-full);
    font-size: 13px;
    font-weight: 500;
    color: var(--tpf-blue);
}

.tpf-active-tag .tpf-remove-tag {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--tpf-blue);
    line-height: 1;
    padding: 0;
    opacity: 0.6;
    transition: var(--tpf-transition);
}

.tpf-active-tag .tpf-remove-tag:hover { opacity: 1; }

.tpf-clear-all-filters {
    background: none;
    border: none;
    color: var(--tpf-gray-500);
    font-size: 13px;
    cursor: pointer;
    font-family: var(--tpf-font);
    transition: var(--tpf-transition);
    white-space: nowrap;
}

.tpf-clear-all-filters:hover { color: var(--tpf-gray-900); }

/* 활성 필터 칩 (JS 생성 클래스) */
.tpf-active-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px 5px 12px;
    background: var(--tpf-white);
    border: 1.5px solid var(--tpf-gray-300);
    border-radius: var(--tpf-radius-full);
    font-size: 13px;
    font-weight: 500;
    color: var(--tpf-gray-700);
    white-space: nowrap;
}

.tpf-chip-text { line-height: 1; }

.tpf-active-chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    color: var(--tpf-gray-500);
    line-height: 1;
    padding: 0;
    margin-left: 1px;
    transition: var(--tpf-transition);
    font-family: var(--tpf-font);
}

.tpf-active-chip-remove:hover { color: var(--tpf-gray-900); }

/* ==========================================================================
   제품 그리드
   ========================================================================== */
.tpf-product-grid { display: grid; gap: 20px; }

.tpf-columns-5 { grid-template-columns: repeat(5, 1fr); }
.tpf-columns-4 { grid-template-columns: repeat(4, 1fr); }
.tpf-columns-3 { grid-template-columns: repeat(3, 1fr); }
.tpf-columns-2 { grid-template-columns: repeat(2, 1fr); }

/* ==========================================================================
   제품 카드 — 토스 스타일
   ========================================================================== */
.tpf-product-card {
    background: var(--tpf-white);
    border-radius: var(--tpf-radius-lg);
    box-shadow: var(--tpf-shadow-sm);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid #dbdbdb;
}

.tpf-product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--tpf-shadow-lg);
    border-color: transparent;
}

.tpf-card-image {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--tpf-gray-50);
    margin: 8px;
    border-radius: var(--tpf-radius-md);
}

.tpf-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1);
}

.tpf-product-card:hover .tpf-card-image img { transform: scale(1.04); }

.tpf-card-link { display: block; width: 100%; height: 100%; }

.tpf-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tpf-gray-50);
}

/* 장바구니 추가 버튼 */
.tpf-add-to-cart-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    background: var(--tpf-white);
    color: var(--tpf-gray-700);
    border: none;
    border-radius: var(--tpf-radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.25s ease;
    box-shadow: var(--tpf-shadow-md);
}

.tpf-product-card:hover .tpf-add-to-cart-btn {
    opacity: 1;
    transform: scale(1);
}

.tpf-add-to-cart-btn:hover {
    background: var(--tpf-blue);
    color: var(--tpf-white);
    transform: scale(1.08) !important;
}

.tpf-add-to-cart-btn.added {
    background: var(--tpf-green);
    color: var(--tpf-white);
    animation: tpf-pop 0.35s ease;
}

@keyframes tpf-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* 카드 본문 */
.tpf-card-body { padding: 8px 10px 8px; }

.tpf-card-brand {
    display: none;
    font-size: 11px;
    font-weight: 600;
    color: var(--tpf-blue);
    background: var(--tpf-blue-light);
    padding: 2px 8px;
    border-radius: var(--tpf-radius-full);
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}

.tpf-card-title {
    margin: 0 0 4px;
    font-size: 15px!important;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.3px;
    text-align: center;
}

.tpf-card-title a {
    color: var(--tpf-gray-900);
    text-decoration: none;
    transition: color var(--tpf-transition);
}

.tpf-card-title a:hover { color: var(--tpf-blue); }

.tpf-card-excerpt {
    margin: 0;
    font-size: 13px;
    color: var(--tpf-gray-500);
    line-height: 1.5;
}

/* ==========================================================================
   결과 없음
   ========================================================================== */
.tpf-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: var(--tpf-gray-500);
}

.tpf-no-results-icon { margin-bottom: 16px; color: var(--tpf-gray-300); }

.tpf-no-results p {
    font-size: 16px;
    font-weight: 600;
    color: var(--tpf-gray-700);
    margin: 0 0 4px;
}

.tpf-no-results span {
    font-size: 14px;
    color: var(--tpf-gray-500);
}

/* ==========================================================================
   로딩
   ========================================================================== */
.tpf-loading { text-align: center; padding: 40px; }

.tpf-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--tpf-gray-200);
    border-top-color: var(--tpf-blue);
    border-radius: 50%;
    animation: tpf-spin 0.7s linear infinite;
    margin: 0 auto;
}

@keyframes tpf-spin { to { transform: rotate(360deg); } }

.tpf-product-grid.tpf-is-loading {
    opacity: 0.35;
    pointer-events: none;
    transition: opacity 0.15s;
}

/* ==========================================================================
   페이지네이션
   ========================================================================== */
.tpf-pagination { margin-top: 36px; text-align: center; }

.tpf-page-numbers { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }

.tpf-page-btn {
    min-width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--tpf-gray-600);
    border-radius: var(--tpf-radius-full);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--tpf-transition);
    font-family: var(--tpf-font);
}

.tpf-page-btn:hover { background: var(--tpf-gray-100); color: var(--tpf-gray-900); }

.tpf-page-btn.active {
    background: var(--tpf-blue);
    color: var(--tpf-white);
    font-weight: 700;
}

.tpf-load-more-btn {
    padding: 14px 48px;
    background: transparent;
    color: var(--tpf-gray-700);
    border: 1.5px solid var(--tpf-gray-300);
    border-radius: var(--tpf-radius-full);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--tpf-transition);
    font-family: var(--tpf-font);
}

.tpf-load-more-btn:hover {
    background: var(--tpf-blue);
    color: var(--tpf-white);
    border-color: var(--tpf-blue);
}

.tpf-load-more-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ==========================================================================
   반응형
   ========================================================================== */
@media (max-width: 1199px) {
    .tpf-columns-5 { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 991px) {
    .tpf-filter-grid { flex-direction: column; }

    .tpf-layout-sidebar .tpf-filter-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 300px;
        height: 100vh;
        max-height: 100vh;
        z-index: 9999;
        border-radius: 0 var(--tpf-radius-lg) var(--tpf-radius-lg) 0;
        box-shadow: var(--tpf-shadow-xl);
        transition: left 0.35s cubic-bezier(0.32, 0.72, 0, 1);
        overflow-y: auto;
    }

    .tpf-layout-sidebar .tpf-filter-sidebar.tpf-sidebar-open { left: 0; }
    .tpf-mobile-filter-toggle { display: flex; }

    .tpf-columns-5, .tpf-columns-4 { grid-template-columns: repeat(3, 1fr); }

    .tpf-sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.3);
        z-index: 9998;
        backdrop-filter: blur(2px);
    }

    .tpf-sidebar-overlay.active { display: block; }

    /* Mobile: convert accordion sidebar to modal */
    .tpf-layout-sidebar-accordion .tpf-filter-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 300px;
        height: 100vh;
        max-height: 100vh;
        z-index: 9999;
        border-radius: 0 var(--tpf-radius-lg) var(--tpf-radius-lg) 0;
        box-shadow: var(--tpf-shadow-xl);
        transition: left 0.35s cubic-bezier(0.32, 0.72, 0, 1);
        overflow-y: auto;
        background: var(--tpf-white);
    }

    .tpf-layout-sidebar-accordion .tpf-filter-sidebar.tpf-sidebar-open {
        left: 0;
    }
}

@media (max-width: 767px) {
    .tpf-columns-5, .tpf-columns-4, .tpf-columns-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .tpf-product-grid { gap: 12px; }
    .tpf-grid-toolbar { flex-direction: column; gap: 12px; align-items: flex-start; }
    .tpf-card-image { margin: 6px; }
    .tpf-card-body { padding: 6px 10px 14px; }
    .tpf-card-title { font-size: 14px; }
}

@media (max-width: 479px) {
    .tpf-columns-5, .tpf-columns-4, .tpf-columns-3, .tpf-columns-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 스크롤바 */
.tpf-filter-sidebar::-webkit-scrollbar { width: 3px; }
.tpf-filter-sidebar::-webkit-scrollbar-track { background: transparent; }
.tpf-filter-sidebar::-webkit-scrollbar-thumb { background: var(--tpf-gray-200); border-radius: 3px; }
