/* ==========================================================================
   T&M Product Catalog — Premium Dark Sidebar Layout
   ========================================================================== */

.tm-catalog-wrapper {
    background: #1a1a1f;
    padding: 48px 0 80px;
    min-height: 600px;
}

.tm-catalog-wrapper > .container,
.tm-catalog-hero .container {
    max-width: 100%;
    width: 100%;
    padding-left: 50px;
    padding-right: 50px;
}

/* ==========================================================================
   HERO
   ========================================================================== */
.tm-catalog-hero {
    position: relative;
    padding: 160px 0 56px;
    background: #050505;
    overflow: hidden;
}

.tm-catalog-hero > .tm-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    pointer-events: none;
    opacity: 0.35;
    z-index: 0;
}

.tm-catalog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(165deg, rgba(26,10,62,0.9) 0%, rgba(45,17,102,0.75) 35%, rgba(85,34,221,0.55) 70%, rgba(119,68,238,0.45) 100%),
        radial-gradient(ellipse 80% 60% at 70% 20%, rgba(221,119,34,0.12) 0%, transparent 60%);
    pointer-events: none;
}

.tm-catalog-hero-inner {
    position: relative;
    z-index: 2;
}

.tm-hero-eyebrow {
    display: block;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #ffffff;
    margin-bottom: 12px;
}

.tm-catalog-hero h1 {
    font-size: 48px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 12px;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.tm-catalog-hero p {
    font-size: 17px;
    color: rgba(255,255,255,0.9);
    margin: 0;
    font-family: 'Inter', sans-serif;
    max-width: 520px;
    line-height: 1.6;
}

.tm-catalog-hero .ascential-btn {
    margin-top: 28px;
}

/* Hero 2-column layout */
.tm-hero-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.tm-hero-rotating-word {
    color: #dd7722;
    display: inline-block;
}

/* Chatbot overrides when inside hero */
.tm-hero-finder .chatbot-inline-container {
    margin: 0;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.06);
}

.tm-hero-finder .chatbot-inline-messages {
    min-height: 300px !important;
    max-height: 380px !important;
}

/* First message text black inside hero finder */
.tm-hero-finder .chatbot-message.assistant-message .message-content .message-agent-name,
.tm-hero-finder .chatbot-message.assistant-message .message-content .message-text {
    color: #000 !important;
}

/* ==========================================================================
   HEADER SECTION (above grid)
   ========================================================================== */
.tm-catalog-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 40px;
}

.tm-catalog-header-text h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #fff;
    margin: 0;
    font-family: 'Inter', sans-serif;
}

.tm-catalog-header-text p {
    font-size: 14px;
    color: #ffffff;
    margin: 4px 0 0;
    font-family: 'Inter', sans-serif;
}

.tm-catalog-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tm-sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-sizing: border-box;
    min-height: 34px;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.25;
    color: #fff;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.tm-sort-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
}

.tm-sort-btn span {
    white-space: nowrap;
}

.tm-sort-btn select {
    background: transparent;
    border: none;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    padding-right: 0;
}

.tm-sort-btn select:focus {
    outline: none;
}

.tm-sort-btn select option {
    background: #111;
    color: #fff;
}

.tm-clear-all-filters-btn {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    color: #fff;
    cursor: pointer;
    transition: opacity 0.2s;
}

.tm-clear-all-filters-btn:hover {
    opacity: 0.85;
}

.tm-clear-all-filters-btn:focus {
    outline: none;
}

/* ==========================================================================
   LAYOUT: SIDEBAR + GRID
   ========================================================================== */
.tm-catalog-layout {
    display: flex;
    gap: 40px;
}

.tm-catalog-main {
    flex: 1;
    min-width: 0;
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
.tm-catalog-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.tm-sidebar-section {
    margin-bottom: 28px;
}

/* Mobile filter trigger: only visible in mobile media query below */
.tm-mobile-filter-trigger {
    display: none;
}

.tm-mobile-filter-trigger:focus {
    outline: none;
}

.tm-sidebar-heading {
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 14px;
    font-family: 'Inter', sans-serif;
}

/* ---- Search ---- */
.tm-sidebar-search {
    position: relative;
    margin-bottom: 28px;
}

.tm-sidebar-search input {
    width: 100%;
    padding: 10px 42px 10px 12px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #fff;
    background: rgba(255,255,255,0.06);
    transition: all 0.2s;
}

.tm-sidebar-search input::placeholder {
    color: #ffffff !important;
    opacity: 1 !important;
}

.tm-sidebar-search input:focus {
    outline: none;
    background: rgba(255,255,255,0.1);
    border-color: #5522dd;
    color: #fff;
    box-shadow: 0 0 0 3px rgba(85,34,221,0.3), 0 0 16px rgba(85,34,221,0.15);
}

.tm-sidebar-search .tm-search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
    pointer-events: none;
    font-size: 15px;
    transition: opacity 0.2s;
}

/* Hide icon when user is typing (behaves like placeholder) */
.tm-sidebar-search:has(input:not(:placeholder-shown)) .tm-search-icon {
    opacity: 0;
}

/* ---- Sidebar Divider ---- */
.tm-sidebar-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin: 20px 0;
}

/* ---- Subcategory Indent ---- */
.tm-subcategory-indent {
    padding-left: 22px !important;
    margin-top: 2px;
    border-left: 2px solid rgba(85,34,221,0.2);
    margin-left: 8px;
}

.tm-subcategory-indent label {
    font-size: 12px !important;
    padding: 4px 8px !important;
}

.tm-subcategory-indent .tm-checkbox-mark {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.tm-subcategory-indent .tm-checkbox-label {
    color: #ffffff;
}

.tm-subcategory-indent .tm-checkbox-count {
    font-size: 10px;
}

/* ==========================================================================
   CHECKBOX LIST
   ========================================================================== */
.tm-checkbox-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tm-checkbox-list li {
    margin-bottom: 2px;
}

.tm-checkbox-list label {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    line-height: 1.5em;
    cursor: pointer;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    color: #fff;
    padding: 6px 8px;
    border-radius: 6px;
    transition: background 0.15s;
}

.tm-catalog-sidebar .tm-checkbox-list .tm-checkbox-mark {
    display: flex !important;
}

.tm-catalog-sidebar .tm-checkbox-list .tm-checkbox-label {
    display: inline !important;
}

.tm-catalog-sidebar .tm-checkbox-list .tm-checkbox-count {
    display: inline !important;
}

.tm-checkbox-list label:hover {
    background: rgba(255,255,255,0.06);
}

.tm-checkbox-list input[type="checkbox"] {
    display: none;
}

.tm-checkbox-mark {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 2px solid rgba(255,255,255,0.4);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tm-checkbox-list label:hover .tm-checkbox-mark {
    border-color: rgba(255,255,255,0.6);
}

.tm-checkbox-list input[type="checkbox"]:checked + .tm-checkbox-mark {
    background: #5522dd;
    border-color: #5522dd;
    box-shadow: 0 0 8px rgba(85,34,221,0.4);
}

.tm-checkbox-mark svg {
    width: 11px;
    height: 11px;
    color: #fff;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tm-checkbox-list input[type="checkbox"]:checked + .tm-checkbox-mark svg {
    opacity: 1;
    transform: scale(1);
}

.tm-checkbox-label {
    flex: 1;
    color: #fff;
    font-weight: 500;
}

.tm-checkbox-list input[type="checkbox"]:checked ~ .tm-checkbox-label {
    color: #fff;
}

.tm-checkbox-count {
    margin-left: auto;
    font-size: 11px;
    color: #ffffff;
    font-weight: 500;
    padding-left: 8px;
}

/* ==========================================================================
   ACTIVE FILTERS + RESULT COUNT
   ========================================================================== */
.tm-filter-status-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 16px;
    min-height: 28px;
}

.tm-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.tm-active-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(85,34,221,0.15);
    color: #c4b5fd;
    border: 1px solid rgba(85,34,221,0.25);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.tm-pill-remove {
    background: none;
    border: none;
    color: #c4b5fd;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    opacity: 0.6;
    transition: opacity 0.15s;
}

.tm-pill-remove:hover {
    opacity: 1;
}

.tm-clear-all {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    text-decoration: underline;
    padding: 4px 8px;
    transition: color 0.15s;
}

.tm-clear-all:hover {
    color: #fff;
}

.tm-result-count {
    font-size: 13px;
    font-weight: 500;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

/* ==========================================================================
   PRODUCT GRID (CSS Grid — 3 cols default)
   ========================================================================== */
.tm-catalog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    min-height: 200px;
}

.tm-catalog-grid-loader {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

/* ==========================================================================
   PRODUCT CARD — Minimal Dark
   ========================================================================== */
.tm-catalog-card {
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none !important;
    box-shadow: 0px 4px 14px rgba(108, 73, 172, 0.06);
    transition: all 0.6s cubic-bezier(0.76, 0, 0.24, 1);
    position: relative;
    animation: tm-card-enter 0.4s ease both;
}

.tm-catalog-card:nth-child(2) { animation-delay: 0.05s; }
.tm-catalog-card:nth-child(3) { animation-delay: 0.1s; }
.tm-catalog-card:nth-child(4) { animation-delay: 0.15s; }
.tm-catalog-card:nth-child(5) { animation-delay: 0.2s; }
.tm-catalog-card:nth-child(6) { animation-delay: 0.25s; }
.tm-catalog-card:nth-child(7) { animation-delay: 0.3s; }
.tm-catalog-card:nth-child(8) { animation-delay: 0.35s; }
.tm-catalog-card:nth-child(9) { animation-delay: 0.4s; }
.tm-catalog-card:nth-child(10) { animation-delay: 0.45s; }
.tm-catalog-card:nth-child(11) { animation-delay: 0.5s; }
.tm-catalog-card:nth-child(12) { animation-delay: 0.55s; }

@keyframes tm-card-enter {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.tm-catalog-card:hover {
    border-color: rgba(85,34,221,0.25);
    box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

/* --- Card Image --- */
.tm-catalog-card-image {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #0d0d0d;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.tm-catalog-card:hover .tm-catalog-card-image {
    background: #141414;
}

.tm-catalog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.tm-catalog-card:hover .tm-catalog-card-image img {
    transform: scale(1.05);
}

.tm-catalog-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0d0d0d;
    position: relative;
}

.tm-catalog-card-placeholder::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5522dd, #dd7722);
    filter: blur(50px);
    opacity: 0.25;
    transition: opacity 0.5s, transform 0.5s;
}

.tm-catalog-card:hover .tm-catalog-card-placeholder::before {
    opacity: 0.45;
    transform: scale(1.1);
}

/* Hover overlay */
.tm-catalog-card-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: rgba(85,34,221,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tm-catalog-card:hover .tm-catalog-card-overlay {
    opacity: 1;
}

.tm-catalog-card-view {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.tm-catalog-card-view i {
    color: #5522dd !important;
    font-size: 20px;
}

.tm-catalog-card:hover .tm-catalog-card-view {
    transform: scale(1);
}

/* --- Card Body --- */
.tm-catalog-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.tm-catalog-card-title {
    font-size: 15px;
    font-weight: 600;
    color: white !important;
    line-height: 1.4;
    margin: 0 0 4px;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.tm-catalog-card:hover .tm-catalog-card-title {
    color: white !important;
}

.tm-catalog-card-excerpt {
    font-size: 12px;
    font-weight: 400;
    color: #ffffff !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    margin-top: 4px;
}

.tm-catalog-card-cat {
    font-size: 11px;
    font-weight: 500;
    color: #dd7722 !important;
    display: block;
    line-height: 1.4;
    margin-top: auto;
    padding-top: 12px;
}

/* ==========================================================================
   NO RESULTS & LOADER
   ========================================================================== */
.tm-no-results {
    padding: 40px 20px;
}

.tm-no-results h3 {
    font-size: 20px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
}

.tm-no-results p {
    font-size: 14px;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
}

.tm-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

.tm-loader-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255,255,255,0.15);
    border-top-color: #dd7722;
    border-radius: 50%;
    animation: tm-spin 0.7s linear infinite;
}

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

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.tm-pagination-wrap {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.tm-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tm-pagination ul {
    display: flex;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center;
}

.tm-page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff !important;
    text-decoration: none !important;
    background: transparent;
    border: none;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
}

.tm-page-link:hover {
    background: rgba(255,255,255,0.06);
    color: #fff !important;
}

.tm-page-link.tm-page-active {
    background: #5522dd;
    color: white !important;
}

.tm-page-link.tm-page-active:hover {
    background: #4418bb;
}

.tm-page-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 14px;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
}

.tm-page-prev,
.tm-page-next {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #ffffff !important;
    text-decoration: none !important;
    transition: color 0.2s;
    cursor: pointer;
    background: none;
    border: none;
    font-family: 'Inter', sans-serif;
    padding: 0;
    white-space: nowrap;
}

.tm-page-prev:hover,
.tm-page-next:hover {
    color: #fff !important;
}

.tm-page-prev svg,
.tm-page-next svg {
    display: block;
}

/* ==========================================================================
   BUTTON HOVER CONSISTENCY
   ========================================================================== */
.tm-catalog-wrapper .ascential-btn:hover,
.tm-catalog-hero .ascential-btn:hover {
    background-color: #5522dd !important;
    transform: translateX(10px) !important;
}

/* ==========================================================================
   FEATURED SOLUTIONS — Bento Grid
   ========================================================================== */
.tm-featured-solutions {
    margin-bottom: 40px;
}

.tm-featured-heading {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 20px;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
}

.tm-featured-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 16px;
    height: 480px;
}

.tm-featured-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none !important;
    box-shadow: 0px 4px 14px rgba(108, 73, 172, 0.06);
    transition: all 0.6s cubic-bezier(0.76, 0, 0.24, 1);
}

.tm-featured-card:hover {
    border-color: rgba(85,34,221,0.25);
    box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

.tm-featured-card-big {
    grid-row: 1 / 3;
}

/* --- Featured Card Image --- */
.tm-featured-card-image {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.tm-featured-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.tm-featured-card:hover .tm-featured-card-image img {
    transform: scale(1.05);
}

.tm-featured-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.1) 100%);
    z-index: 1;
    transition: background 0.3s;
}

.tm-featured-card:hover .tm-featured-card-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.35) 50%, rgba(0,0,0,0.15) 100%);
}

/* --- Featured Card Content --- */
.tm-featured-card-content {
    position: relative;
    z-index: 2;
    margin-top: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tm-featured-card-big .tm-featured-card-content {
    padding: 32px;
    gap: 8px;
}

.tm-featured-badge {
    display: inline-flex;
    align-self: flex-start;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: rgba(85,34,221,0.7);
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.tm-featured-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff !important;
    margin: 0;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.tm-featured-card-big .tm-featured-card-title {
    font-size: 22px;
}

.tm-featured-card-excerpt {
    font-size: 13px;
    font-weight: 400;
    color: rgba(255,255,255,0.7) !important;
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tm-featured-card-big .tm-featured-card-excerpt {
    -webkit-line-clamp: 3;
}

.tm-featured-card-cat {
    font-size: 11px;
    font-weight: 500;
    color: #dd7722 !important;
    margin-top: 4px;
}

/* --- Featured Card Arrow --- */
.tm-featured-card-arrow {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 3;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: #fff;
    font-size: 14px;
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s ease;
}

.tm-featured-card:hover .tm-featured-card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* --- Featured Solutions Responsive --- */
@media (max-width: 991px) {
    .tm-featured-grid {
        height: 420px;
    }

    .tm-featured-card-big .tm-featured-card-content {
        padding: 24px;
    }

    .tm-featured-card-big .tm-featured-card-title {
        font-size: 18px;
    }
}

@media (max-width: 767px) {
    .tm-featured-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        height: auto;
    }

    .tm-featured-card-big {
        grid-row: auto;
    }

    .tm-featured-card {
        min-height: 220px;
    }

    .tm-featured-card-big {
        min-height: 440px;
    }

    .tm-featured-card-big .tm-featured-card-title {
        font-size: 20px;
    }

    .tm-featured-solutions {
        margin-bottom: 32px;
    }
}

/* ==========================================================================
   SCROLL REVEAL ANIMATION
   ========================================================================== */
.tm-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.tm-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1199px) {
    .tm-catalog-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 991px) {
    .tm-catalog-layout {
        flex-direction: column;
    }

    .tm-catalog-main {
        position: relative;
        z-index: 0;
    }

    .tm-catalog-sidebar {
        position: relative;
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 16px;
        align-items: flex-start;
        border-radius: 12px;
        padding: 16px;
    }

    .tm-sidebar-search {
        width: 100%;
        margin-bottom: 8px;
    }

    .tm-sidebar-section {
        flex: 1;
        min-width: 200px;
        margin-bottom: 0;
    }

    /* Mobile: categories as dropdown — trigger matches .tm-sort-btn */
    .tm-mobile-filter-trigger {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        box-sizing: border-box;
        width: 100%;
        min-height: 34px;
        padding: 6px 16px;
        font-size: 14px;
        font-weight: 500;
        line-height: 1.25;
        color: #fff !important;
        background: rgba(255,255,255,0.06) !important;
        border: 1px solid rgba(255,255,255,0.1) !important;
        border-radius: 0;
        font-family: 'Inter', sans-serif;
        cursor: pointer;
        transition: all 0.2s;
        appearance: none;
        -webkit-appearance: none;
    }

    .tm-mobile-filter-trigger::after {
        content: '';
        width: 0;
        height: 0;
        margin-left: 8px;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 6px solid rgba(255,255,255,0.7);
        transition: transform 0.2s;
    }

    .tm-categories-dropdown.is-open .tm-mobile-filter-trigger {
        background: rgba(255,255,255,0.1) !important;
        border-color: rgba(255,255,255,0.2) !important;
        color: #fff !important;
    }

    .tm-mobile-filter-trigger:hover {
        background: rgba(255,255,255,0.1) !important;
        border-color: rgba(255,255,255,0.2) !important;
        color: #fff !important;
    }

    .tm-categories-dropdown {
        position: relative;
        width: 100%;
        flex: 1 1 100%;
    }

    /* Lift entire sidebar above grid when dropdown is open (stacking context) */
    .tm-catalog-sidebar:has(.tm-categories-dropdown.is-open) {
        position: relative;
        z-index: 999999 !important;
    }

    .tm-categories-dropdown.is-open {
        z-index: 999999 !important;
    }

    .tm-categories-dropdown:not(.is-open) .tm-categories-panel {
        display: none !important;
    }

    .tm-categories-dropdown .tm-categories-panel {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        margin-top: 6px;
        padding: 16px;
        background: #0d0d0d;
        border: 1px solid rgba(255,255,255,0.1);
        border-radius: 0;
        max-height: 70vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        z-index: 999999 !important;
        box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    }

    .tm-categories-dropdown.is-open .tm-categories-panel {
        display: block !important;
    }

    .tm-categories-dropdown.is-open .tm-mobile-filter-trigger::after {
        transform: rotate(180deg);
    }

    .tm-sidebar-divider {
        display: none;
    }

    .tm-catalog-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .tm-hero-columns {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .tm-catalog-hero h1 {
        font-size: 36px;
    }
}

@media (max-width: 767px) {
    .tm-catalog-wrapper {
        padding: 32px 0 60px;
    }

    .tm-catalog-wrapper > .container,
    .tm-catalog-hero .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .tm-catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .tm-catalog-header-text h1 {
        font-size: 22px;
    }

    .tm-catalog-card-body {
        padding: 14px;
    }

    .tm-catalog-card-title {
        font-size: 13px;
    }

    .tm-sidebar-section {
        min-width: 150px;
    }

    .tm-catalog-hero {
        padding: 160px 0 48px;
    }

    .tm-catalog-hero > .tm-hero-bg {
        opacity: 0.2;
    }

    .tm-catalog-hero h1 {
        font-size: 28px;
    }

    .tm-catalog-hero p {
        font-size: 15px;
    }

    .tm-hero-columns {
        gap: 24px;
    }

    .tm-hero-finder .chatbot-inline-messages {
        min-height: 240px !important;
        max-height: 320px !important;
    }
}

@media (max-width: 480px) {
    .tm-catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .tm-catalog-card-title {
        font-size: 12px;
    }

    .tm-catalog-card-body {
        padding: 12px;
    }

    .tm-catalog-card-excerpt {
        display: none;
    }

    .tm-catalog-card-cat {
        font-size: 10px;
    }
}

/* Desktop: hide mobile filter trigger so only sidebar list shows */
@media (min-width: 992px) {
    .tm-mobile-filter-trigger {
        display: none !important;
    }
}

/* ==========================================================================
   Category Products Section (injected on division pages)
   ========================================================================== */

.tm-category-products-section {
    background: #0a0a0f;
    padding: 80px 0;
    border-radius: 16px;
}

/* Full-bleed when appended to the_content (not inside Elementor widget) */
.entry-content > .tm-category-products-section,
.elementor-widget-theme-post-content .elementor-widget-container > .tm-category-products-section {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    border-radius: 0;
}

.tm-category-products-inner {
    max-width: 100%;
    padding-left: 50px;
    padding-right: 50px;
    margin: 0 auto;
}

.tm-category-products-title {
    color: #ffffff;
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 40px;
    letter-spacing: -0.02em;
}

.tm-category-products-grid {
    grid-template-columns: repeat(4, 1fr) !important;
}

.tm-category-products-cta {
    text-align: center;
    margin-top: 48px;
}

@media (max-width: 991px) {
    .tm-category-products-section {
        padding: 48px 0;
    }

    .tm-category-products-inner {
        padding-left: 20px;
        padding-right: 20px;
    }

    .tm-category-products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .tm-category-products-title {
        font-size: 24px;
        margin-bottom: 24px;
    }
}

@media (max-width: 480px) {
    .tm-category-products-inner {
        padding-left: 10px;
        padding-right: 10px;
    }
}
