/**
 * Templates listing page styles
 * Shortcode: [tncftm_templates_variant_filter]
 *
 * Pixel-perfect conversion of Template page.png reference design.
 */

/* ============================================================
   Root & Box-Model Reset
   ============================================================ */

.tncftm-tp {
    --tp-brand: #5a68ff;
    --tp-brand-dark: #4553f0;
    --tp-brand-rgb: 90, 104, 255;
    --tp-ink: #0b0b14;
    --tp-muted: #6b6b7b;
    --tp-border: #e5e5ec;
    --tp-panel: #f4f4f6;
    --tp-white: #ffffff;
    --tp-radius: 12px;
    --tp-card-radius: 10px;
    --tp-placeholder: #c9c9cf;
    --tp-offer-bg: #d9d9de;
    --tp-sidebar-width: 328px;
    --tp-gap: 32px;
    --tp-grid-gap: 29px;

    width: 100%;
    background-color: #fff;
    color: var(--tp-ink);
    font-family: inherit;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.tncftm-tp *,
.tncftm-tp *::before,
.tncftm-tp *::after {
    box-sizing: border-box;
}

/* ============================================================
   Container Wrapper (1400px max-width)
   ============================================================ */

.tncftm-tp-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

/* ============================================================
   Header & Search Bar  (title, desc, centred pill input)
   ============================================================ */

.tncftm-tp-header {
    width: 100%;
    text-align: center;
    background-color: #F5F3F2;
    padding-top: 86px;
    padding-bottom: 69px;
    margin: 0 0 52px;
}

.tncftm-tp-header-title {
    color: #000;
    text-align: center;
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 38px;
    font-style: normal;
    font-weight: 600;
    line-height: 120%;
    letter-spacing: -1.14px;
    max-width: 715px;
    margin: auto;
    padding-bottom: 10px;
}

.tncftm-tp-header-desc {
    margin: 0 auto 28px;
    max-width: 660px;
    color: #676666;
    text-align: center;
    font-family: "Inter Tight", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: 160%;
}

.tncftm-tp-searchbar {
    display: flex;
    justify-content: center;
}

.tncftm-tp-search {
    position: relative;
    display: block;
    width: 100%;
    max-width: 580px;
}

.tncftm-tp-search-input {
    width: 100%;
    height: 50px;
    padding: 0 50px 0 22px;
    border: 1px solid #787878;
    border-radius: 100px;
    background: #FFF;
    color: #000;
    font-family: "Inter Tight", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: 160%;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tncftm-tp-search-input::placeholder {
    color: var(--tp-muted);
}

.tncftm-tp-search-input:focus {
    border-color: var(--tp-brand);
    box-shadow: 0 0 0 3px rgba(var(--tp-brand-rgb), 0.12);
}

.tncftm-tp-search-icon {
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tp-ink);
    pointer-events: none;
}

/* ============================================================
   Two-column layout  (sidebar + main)
   ============================================================ */

.tncftm-tp-layout {
    width: 100%;
    display: grid;
    grid-template-columns: var(--tp-sidebar-width) minmax(0, 1fr);
    gap: var(--tp-gap);
    align-items: start;
}

.tncftm-tp-layout-full {
    grid-template-columns: minmax(0, 1fr);
}

.tncftm-tp-main {
    min-width: 0;
}

/* ============================================================
   Sidebar  (Categories)
   ============================================================ */

.tncftm-tp-sidebar {
    border-radius: var(--tp-radius);
    overflow: hidden;
    background: var(--tp-white);
    position: sticky;
    top: 24px;
}

/* --- Header row --- */

.tncftm-tp-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    background-color: #F5F3F2;
}

.tncftm-tp-sidebar-title {
    margin: 0;
    color: #01072B !important;
    font-family: "Inter Tight", sans-serif;
    font-size: 18px;
    font-style: normal;
    font-weight: 600;
    line-height: 160%;
    letter-spacing: 0.36px;
    padding-bottom: 0px;
}

/* mobile toggle (hidden on desktop) */
.tncftm-tp-sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--tp-border);
    border-radius: 8px;
    background: var(--tp-white);
    color: var(--tp-ink);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.tncftm-tp-sidebar-toggle[aria-expanded="true"] {
    transform: rotate(180deg);
}

/* --- Category list --- */

.tncftm-tp-cat-list {
    margin: 0;
    padding: 8px 10px 12px;
    list-style: none;
    background: #F5F3F2;
    border-radius: 4px;
}

.tncftm-tp-cat-list li {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* each category button */
.tncftm-tp-cat {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 7px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #4A5568;
    font-family: "Inter Tight", sans-serif;
    font-size: 15px;
    font-style: normal;
    font-weight: 500;
    line-height: 150%;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.tncftm-tp-cat:hover {
    color: #5A68FF;
}

.tncftm-tp-cat.is-active {
    color: var(--tp-brand);
    font-weight: 600;
}

/* icon slot */
.tncftm-tp-cat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    color: currentColor;
    opacity: 0.65;
}

.tncftm-tp-cat.is-active .tncftm-tp-cat-icon {
    opacity: 1;
}

.tncftm-tp-cat-icon img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.tncftm-tp-cat-icon-mask {
    display: block;
    width: 16px;
    height: 16px;
    background-color: currentColor;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.tncftm-tp-cat-name {
    flex: 1 1 auto;
}

/* ============================================================
   Toolbar  (Platform / Pro & Free / Featured dropdowns)
   ============================================================ */

.tncftm-tp-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.tncftm-tp-toolbar-left,
.tncftm-tp-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* --- Custom select trigger button --- */

.tncftm-tp-select {
    position: relative;
}

.tncftm-tp-select-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 130px;
    height: 38px;
    padding: 0 14px;
    border: 1px solid var(--tp-border);
    border-radius: 4px;
    background: #F5F3F2;
    color: #000;
    font-family: "Inter Tight";
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: 160%;
    letter-spacing: 0.14px;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tncftm-tp-select-btn:hover {
    border-color: #cfcfdb;
}

.tncftm-tp-select.is-open .tncftm-tp-select-btn {
    border-color: var(--tp-brand);
    box-shadow: 0 0 0 3px rgba(var(--tp-brand-rgb), 0.1);
}

.tncftm-tp-select.is-open .tncftm-tp-select-btn svg {
    transform: rotate(180deg);
}

.tncftm-tp-select-btn svg {
    flex: 0 0 auto;
    transition: transform 0.2s ease;
}

.tncftm-tp-select-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Dropdown menu panel --- */

.tncftm-tp-select-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 30;
    min-width: 100%;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: var(--tp-white);
    border: 1px solid var(--tp-border);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(11, 11, 20, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
    padding-right: 10px;
}

.tncftm-tp-toolbar-right .tncftm-tp-select-menu {
    left: auto;
    right: 0;
}

.tncftm-tp-select.is-open .tncftm-tp-select-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tncftm-tp-select-menu li {
    margin: 0;
    list-style: none;
}

.tncftm-tp-select-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    font-size: 13.5px;
    line-height: 1.3;
    text-align: left;
    white-space: nowrap;
    color: #000 !important;
    cursor: pointer;
    transition: background-color 0.12s ease;
    font-family: 'Inter Tight';
}

.tncftm-tp-select-option:hover {
    background: var(--tp-panel);
}

.tncftm-tp-select-option.is-selected {
    color: var(--tp-brand);
    font-weight: 500;
}

.tncftm-tp-select-check {
    opacity: 0;
    flex: 0 0 auto;
}

.tncftm-tp-select-option.is-selected .tncftm-tp-select-check {
    opacity: 1;
}

/* ============================================================
   Template Grid  (3 columns)
   ============================================================ */

.tncftm-tp-results {
    position: relative;
}

.tncftm-tp-grid,
.tncftm-tp-skeleton {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--tp-grid-gap);
}

.tncftm-tp-grid.is-loading {
    display: none;
}

.tncftm-tp-skeleton[hidden] {
    display: none;
}

/* ============================================================
   Template Card
   ============================================================ */

.tncftm-tp-card {
    display: flex;
    flex-direction: column;
    gap: 17px;
    min-width: 0;
}

/* --- Thumbnail area --- */

.tncftm-tp-card-thumb {
    position: relative;
    border-radius: var(--tp-card-radius);
    overflow: hidden;
    background: var(--tp-placeholder);
    aspect-ratio: 4 / 5;
}

.tncftm-tp-card-thumb>a {
    display: block;
    width: 100%;
    height: 100%;
}

.tncftm-tp-card-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.4s ease;
}

.tncftm-tp-card:hover .tncftm-tp-card-thumb img {
    transform: scale(1.03);
}

.tncftm-tp-card-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--tp-placeholder);
}

/* --- Platform logo pills (top-left of thumbnail) --- */

.tncftm-tp-card-logos {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    padding: 5px 8px;
    list-style: none;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 999px;
    transition: opacity 0.2s ease;
}

.tncftm-tp-card-logos li {
    display: flex;
    margin: 0;
    list-style: none;
}

.tncftm-tp-card-logos img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.tncftm-tp-card:hover .tncftm-tp-card-logos {
    opacity: 0;
}

/* --- Hover overlay with action buttons --- */

.tncftm-tp-card-actions {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    background: rgba(11, 11, 20, 0.42);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.tncftm-tp-card:hover .tncftm-tp-card-actions,
.tncftm-tp-card:focus-within .tncftm-tp-card-actions {
    opacity: 1;
    visibility: visible;
}

.tncftm-tp-card-action {
    position: relative;
    z-index: 0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 999px;
    overflow: hidden;
    font-family: "Inter Tight", sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.tncftm-tp-card-action-primary {
    background: var(--tp-brand);
    color: #fff;
}

.tncftm-tp-card-action-primary:hover {
    background: var(--tp-brand-dark);
    color: #fff;
}

.tncftm-tp-card-action-secondary {
    background: var(--tp-white);
    color: var(--tp-ink);
}

.tncftm-tp-card-action-secondary::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: #4038CE;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
}

.tncftm-tp-card-action-secondary:hover {
    color: #fff;
}

.tncftm-tp-card-action-secondary:hover::before {
    transform: scaleX(1);
}

/* --- Card footer  (name / subtitle / badge) --- */

.tncftm-tp-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.tncftm-tp-card-meta {
    min-width: 0;
}

.tncftm-tp-card-title {
    margin: 0 0 2px;
    color: #01072B !important;
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 18px;
    font-style: normal;
    font-weight: 600;
    line-height: 140%;
    letter-spacing: -0.36px;
    padding-bottom: 5px;
    margin: 0px !important;
}

.tncftm-tp-card-title a {
    color: inherit;
    text-decoration: none;
}

.tncftm-tp-card-title a:hover {
    color: var(--tp-brand);
}

.tncftm-tp-card-sub {
    margin: 0;
    color: #5C5C5C !important;
    font-family: "Inter Tight", sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: 140%;
    letter-spacing: 0.28px;
}

/* --- PRO / FREE badge --- */

.tncftm-tp-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.tncftm-tp-badge-pro {
    border-radius: 100px;
    border: 1px solid var(--Secondary-Color, #5A68FF);
    background: rgba(203, 209, 255, 0.19);
    color: var(--Secondary-Color, #5A68FF);
    font-family: "Inter Tight", sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 500;
    line-height: 140%;
    letter-spacing: 0.24px;
}

.tncftm-tp-badge-free {
    border-radius: 100px;
    border: 1px solid #D9D9D9;
    background: #F0F0F0;
    color: #000;
    font-family: "Inter Tight", sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 500;
    line-height: 140%;
    letter-spacing: 0.24px;
}

/* ============================================================
   Customization Offer Banner (.tnc-cta / .tncftm-tp-offer)
   ============================================================ */

.tnc-cta,
.tnc-cta *,
.tnc-cta *::before,
.tnc-cta *::after {
    box-sizing: border-box;
}

.tnc-cta {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 28px 32px;
    background: #F4F4FF;
    border: 1px solid #DEDDFB;
    border-radius: 14px;
    font-family: inherit;
}

.tnc-cta__body {
    flex: 1 1 340px;
    min-width: 0;
}

.tnc-cta__eyebrow {
    margin: 0 0 10px;
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #4F46E5;
    margin: 0px;
}

.tnc-cta__title {
    margin: 0 0 7px;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.32;
    color: #14142B;
    margin: 0px;
    padding-bottom: 2px;
}

.tnc-cta__text {
    margin: 0;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.55;
    color: #5A5A72;
}

.tnc-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    padding: 14px 28px;
    background: #4F46E5;
    border: 0;
    border-radius: 9px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    color: #FFFFFF;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.18s ease, transform 0.18s ease;
}

.tnc-cta__btn:hover,
.tnc-cta__btn:focus-visible {
    background: #4038CE;
    color: #FFFFFF;
}

.tnc-cta__btn:focus-visible {
    outline: 2px solid #14142B;
    outline-offset: 3px;
}

.tnc-cta__btn:active {
    transform: translateY(1px);
}

.tnc-cta__btn svg {
    flex: 0 0 auto;
    transition: transform 0.18s ease;
}

.tnc-cta__btn:hover svg {
    transform: translateX(3px);
}

@media (max-width: 767px) {
    .tnc-cta {
        padding: 24px 22px;
        gap: 20px;
    }

    .tnc-cta__body {
        flex: 1 1 100%;
    }

    .tnc-cta__title {
        font-size: 19px;
    }

    .tnc-cta__text {
        font-size: 14px;
    }

    .tnc-cta__btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================
   Empty State
   ============================================================ */

.tncftm-tp-empty {
    grid-column: 1 / -1;
    padding: 60px 24px;
    text-align: center;
    border: 1px dashed var(--tp-border);
    border-radius: var(--tp-radius);
}

.tncftm-tp-empty-icon {
    display: flex;
    justify-content: center;
    margin: 0 auto 20px;
    width: 168px;
}

.tncftm-tp-empty-icon svg {
    width: 100%;
    height: auto;
    overflow: visible;
    animation: tncftm-tp-empty-float 3.2s ease-in-out infinite;
}

.tncftm-tp-empty-icon-dash {
    transform-origin: 72px 66px;
    animation: tncftm-tp-empty-spin 9s linear infinite;
}

.tncftm-tp-empty-icon-spark {
    transform-origin: 26px 20px;
    animation: tncftm-tp-empty-twinkle 1.8s ease-in-out infinite;
}

.tncftm-tp-empty-icon-glass {
    transform-origin: 106px 98px;
    animation: tncftm-tp-empty-sway 2.6s ease-in-out infinite;
}

@keyframes tncftm-tp-empty-float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes tncftm-tp-empty-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes tncftm-tp-empty-twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.7);
    }

    50% {
        opacity: 1;
        transform: scale(1.15);
    }
}

@keyframes tncftm-tp-empty-sway {
    0%, 100% {
        transform: rotate(-4deg);
    }

    50% {
        transform: rotate(4deg);
    }
}

.tncftm-tp-empty-title {
    font-size: 17px;
    font-weight: 600;
    font-family: 'Inter Tight';
    margin: 0px;
    padding-bottom: 4px;
}

.tncftm-tp-empty-text {
    margin: 0 0 18px;
    font-size: 14px;
    font-family: 'Inter Tight';
    color: var(--tp-muted);
}

.tncftm-tp-empty-reset {
    position: relative;
    z-index: 0;
    overflow: hidden;
    height: 38px;
    padding: 0 20px;
    border: 0;
    border-radius: 100px;
    background: var(--tp-brand);
    color: #fff;
    font-family: "Inter Tight", sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
}

.tncftm-tp-empty-reset::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--tp-brand-dark);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
}

.tncftm-tp-empty-reset:hover::before {
    transform: scaleX(1);
}

/* ============================================================
   Skeleton Loader (shimmer while AJAX is in flight)
   ============================================================ */

.tncftm-tp-skeleton-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tncftm-tp-skeleton-thumb {
    border-radius: var(--tp-card-radius);
    aspect-ratio: 4 / 5;
}

.tncftm-tp-skeleton-foot {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.tncftm-tp-skeleton-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 auto;
}

.tncftm-tp-skeleton-line {
    display: block;
    height: 12px;
    border-radius: 4px;
}

.tncftm-tp-skeleton-line-title {
    width: 60%;
}

.tncftm-tp-skeleton-line-sub {
    width: 45%;
    height: 10px;
}

.tncftm-tp-skeleton-badge {
    display: block;
    width: 48px;
    height: 24px;
    border-radius: 999px;
}

.tncftm-tp-skeleton-thumb,
.tncftm-tp-skeleton-line,
.tncftm-tp-skeleton-badge {
    background: linear-gradient(90deg, #ececed 25%, #f6f6f7 37%, #ececed 63%);
    background-size: 400% 100%;
    animation: tncftm-tp-shimmer 1.4s ease infinite;
}

@keyframes tncftm-tp-shimmer {
    0% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0 50%;
    }
}

@media (prefers-reduced-motion: reduce) {

    .tncftm-tp-skeleton-thumb,
    .tncftm-tp-skeleton-line,
    .tncftm-tp-skeleton-badge,
    .tncftm-tp-empty-icon svg,
    .tncftm-tp-empty-icon-dash,
    .tncftm-tp-empty-icon-spark,
    .tncftm-tp-empty-icon-glass {
        animation: none;
    }
}

/* ============================================================
   Pagination  (Previous | 1 2 3 4 5 | Next)
   ============================================================ */

.tncftm-tp-pagination-wrap:empty {
    display: none;
}

.tncftm-tp-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 48px;
    padding-bottom: 12px;
}

.tncftm-tp-page-btn,
.tncftm-tp-page-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    border: 1px solid var(--tp-border);
    border-radius: 999px;
    background: var(--tp-white);
    font-size: 13.5px;
    color: var(--tp-ink);
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.tncftm-tp-page-btn {
    padding: 0 16px;
}

.tncftm-tp-page-numbers {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tncftm-tp-page-number {
    width: 38px;
    padding: 0;
}

.tncftm-tp-page-btn:hover:not(:disabled),
.tncftm-tp-page-number:hover {
    border-color: var(--tp-brand);
    color: var(--tp-brand);
}

.tncftm-tp-page-number.is-active {
    background: var(--tp-brand);
    border-color: var(--tp-brand);
    color: #fff;
}

.tncftm-tp-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.tncftm-tp-page-gap {
    padding: 0 4px;
    color: var(--tp-muted);
}

/* ============================================================
   Responsive Breakpoints
   ============================================================ */

/* ---- Tablet landscape ---- */
@media (max-width: 1200px) {
    .tncftm-tp {
        --tp-sidebar-width: 280px;
        --tp-gap: 24px;
        --tp-grid-gap: 22px;
    }
}

/* ---- Tablet portrait ---- */
@media (max-width: 991px) {
    .tncftm-tp-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .tncftm-tp-sidebar {
        position: static;
    }

    .tncftm-tp-sidebar-head {
        padding: 9px 20px;
    }

    .tncftm-tp-sidebar-toggle {
        display: inline-flex;
    }

    .tncftm-tp-cat-list {
        display: none;
    }

    .tncftm-tp-sidebar.is-open .tncftm-tp-cat-list {
        display: block;
    }

    .tncftm-tp-grid,
    .tncftm-tp-skeleton {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---- Mobile landscape ---- */
@media (max-width: 767px) {
    .tncftm-tp-toolbar {
        justify-content: flex-start;
        align-items: self-start;
    }

    .tncftm-tp-toolbar-left,
    .tncftm-tp-toolbar-right {
        flex: 1 1 auto;
    }

    .tncftm-tp-select,
    .tncftm-tp-select-btn {
        width: 100%;
    }

    .tncftm-tp-offer {
        padding: 20px;
    }

    .tncftm-tp-page-btn span {
        display: none;
    }

    .tncftm-tp-page-btn {
        width: 38px;
        padding: 0;
    }
}

/* ---- Mobile portrait ---- */
@media (max-width: 575px) {
    .tncftm-tp-header {
        margin-bottom: 36px;
        padding-top: 48px;
        padding-bottom: 40px;
    }

    .tncftm-tp-header-title {
        font-size: 24px;
        margin-bottom: 10px;
    }

    .tncftm-tp-header-desc {
        font-size: 13.5px;
        margin-bottom: 20px;
    }

    .tncftm-tp-search-input {
        height: 46px;
        padding: 0 46px 0 18px;
        font-size: 14px;
    }

    .tncftm-tp-grid,
    .tncftm-tp-skeleton {
        grid-template-columns: minmax(0, 1fr);
    }

    .tncftm-tp-card-thumb {
        aspect-ratio: unset;
        height: 401px;
    }

    .tncftm-tp-card-thumb img {
        height: 401px;
    }

    .tncftm-tp-card-action {
        padding: 8px 14px;
        font-size: 12px;
    }
}

ul#tncftm-tp-cat-list {
    margin-top: 5px !important;
    padding-top: 22px;
}

ul.tncftm-tp-select-menu {
    padding-right: 10px !important;
}

ul.tncftm-tp-select-menu {
    padding-top: 20px !important;
} 