/* =====================================================================
   TTpixel Loop Filter — Frontend Styles
   ===================================================================== */

:root {
    --ttlf-accent:    #c3007a;
    --ttlf-accent2:   #a0006a;
    --ttlf-bg:        #f9f9fb;
    --ttlf-surface:   #ffffff;
    --ttlf-border:    #eaeaee;
    --ttlf-text:      #2d3436;
    --ttlf-muted:     #888;
    --ttlf-radius:    10px;
    --ttlf-shadow:    0 2px 16px rgba(0,0,0,.07);
    --ttlf-trans:     .2s ease;
}

/* =====================================================================
   FILTER PANEL  [ttpixel_product_filter]
   ===================================================================== */

/* Mobile toggle button */
.ttlf-mobile-filter-btn {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--mb-btn-bg, var(--ttlf-accent));
    color: var(--mb-btn-text, #fff);
    border: var(--mb-btn-border-width, 0) solid var(--mb-btn-border, transparent);
    border-radius: var(--mb-btn-radius, 999px);
    font-size: var(--mb-btn-font-sz-tb, 14px);
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(195,0,122,.35);
    margin-bottom: 12px;
    transition: all var(--ttlf-trans);
}
.ttlf-mobile-filter-btn:hover { 
    background: var(--mb-btn-bg-hover, var(--ttlf-accent2)); 
    color: var(--mb-btn-text-hover, var(--mb-btn-text, #fff));
    border-color: var(--mb-btn-border-hover, var(--mb-btn-border, transparent));
    transform: translateY(-1px); 
}

@media (max-width: 768px) {
    .ttlf-mobile-filter-btn {
        font-size: var(--mb-btn-font-sz-mb, var(--mb-btn-font-sz-tb, 14px));
    }
}

/* Overlay */
.ttlf-panel-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 999;
    backdrop-filter: blur(2px);
}
.ttlf-panel-overlay.active { display: block; }

/* Panel */
.ttlf-filter-panel {
    background: var(--ttlf-surface);
    border: 1px solid var(--ttlf-border);
    border-radius: var(--ttlf-radius);
    box-shadow: var(--ttlf-shadow);
    font-family: var(--ttlf-font-family, 'Inter', 'Segoe UI', sans-serif);
    color: var(--ttlf-text);
    overflow: hidden;
}

/* Mobile panel header */
.ttlf-panel-topbar {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--ttlf-border);
    background: var(--ttlf-bg);
}
.ttlf-panel-topbar-title { font-size: 15px; font-weight: 700; }
.ttlf-panel-close {
    background: none; border: none; font-size: 18px;
    cursor: pointer; color: var(--ttlf-muted); padding: 4px;
    line-height: 1; transition: color var(--ttlf-trans);
}
.ttlf-panel-close:hover { color: var(--ttlf-text); }

/* Section blocks */
.ttlf-fp-block {
    border-bottom: 1px solid var(--ttlf-border);
    padding: 16px 18px;
}
.ttlf-fp-block:last-of-type { border-bottom: none; }

/* Search label */
.ttlf-fp-label {
    font-size: var(--ttlf-title-sz-pc, 13px);
    font-weight: 700;
    color: var(--ttlf-title-color, var(--ttlf-text));
    margin-bottom: 10px;
}

/* ── Search row ── */
.ttlf-search-row {
    display: flex;
    gap: 0;
    border: 1.5px solid var(--ttlf-border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--ttlf-bg);
    transition: border-color var(--ttlf-trans);
}
.ttlf-search-row:focus-within { border-color: var(--ttlf-accent); }
.ttlf-search-input {
    flex: 1;
    padding: 9px 12px;
    border: none;
    outline: none;
    font-size: 13px;
    background: transparent;
    color: var(--ttlf-text);
    font-family: inherit;
}
.ttlf-search-btn {
    padding: 0 14px;
    background: var(--ttlf-accent);
    border: none;
    cursor: pointer;
    color: #fff;
    display: flex;
    align-items: center;
    transition: background var(--ttlf-trans);
    flex-shrink: 0;
}
.ttlf-search-btn:hover { background: var(--ttlf-accent2); }

/* ── Collapsible header ── */
.ttlf-section-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    margin-bottom: 12px;
}
.ttlf-collapsible.collapsed .ttlf-section-hd { margin-bottom: 0; }
.ttlf-section-title { font-size: var(--ttlf-title-sz-pc, 14px); font-weight: 700; color: var(--ttlf-title-color, var(--ttlf-text)); }
.ttlf-toggle-btn {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--ttlf-accent);
    color: #fff;
    border: none;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 400;
    transition: background var(--ttlf-trans);
    padding: 0;
    box-sizing: border-box;
    aspect-ratio: 1;
    min-width: 24px;
    max-width: 24px;
    min-height: 24px;
    max-height: 24px;
}
.ttlf-toggle-btn:hover { background: var(--ttlf-accent2); }

/* Section body collapse */
.ttlf-section-body { overflow: hidden; transition: max-height .3s ease; }
.ttlf-collapsible.collapsed .ttlf-section-body { display: none; }

/* ── Checkbox list ── */
.ttlf-check-list {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: var(--ttlf-cat-height, 220px);
    overflow-y: auto;
    padding-right: 4px;
}
.ttlf-check-list::-webkit-scrollbar { width: 4px; }
.ttlf-check-list::-webkit-scrollbar-thumb { background: var(--ttlf-border); border-radius: 99px; }

.ttlf-check-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.ttlf-check-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    flex: 1;
    font-size: var(--ttlf-item-sz-pc, 13px);
    color: var(--ttlf-item-color, var(--ttlf-text));
    padding: 5px 0;
}
.ttlf-check-label input[type="checkbox"] { display: none; }
.ttlf-checkmark {
    width: 17px; height: 17px;
    border: 2px solid var(--ttlf-border);
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--ttlf-trans);
    background: var(--ttlf-surface);
}
.ttlf-check-label input:checked ~ .ttlf-checkmark {
    background: var(--ttlf-accent);
    border-color: var(--ttlf-accent);
}
.ttlf-check-label input:checked ~ .ttlf-checkmark::after {
    content: '';
    width: 5px; height: 9px;
    border: 2px solid #fff;
    border-top: none; border-left: none;
    transform: rotate(42deg) translateY(-1px);
    display: block;
}
.ttlf-check-name { font-size: var(--ttlf-item-sz-pc, 13px); color: var(--ttlf-item-color, var(--ttlf-text)); }
.ttlf-check-count { font-size: 12px; color: var(--ttlf-muted); white-space: nowrap; }

/* ── Price Inputs ── */
.ttlf-price-row {
    display: flex;
    gap: 10px;
}
.ttlf-price-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.ttlf-price-field label { font-size: var(--ttlf-item-sz-pc, 12px); color: var(--ttlf-item-color, var(--ttlf-muted)); font-weight: 600; }
.ttlf-price-input-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--ttlf-border);
    border-radius: 7px;
    overflow: hidden;
    background: var(--ttlf-bg);
    transition: border-color var(--ttlf-trans);
}
.ttlf-price-input-wrap:focus-within { border-color: var(--ttlf-accent); }
.ttlf-currency {
    padding: 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ttlf-muted);
    border-right: 1px solid var(--ttlf-border);
    background: #f0f0f5;
    align-self: stretch;
    display: flex;
    align-items: center;
}
.ttlf-price-input {
    flex: 1;
    padding: 8px 10px;
    border: none;
    outline: none;
    font-size: 13px;
    background: transparent;
    color: var(--ttlf-text);
    font-family: inherit;
    width: 100%;
    min-width: 0;
}
/* hide number spinners */
.ttlf-price-input::-webkit-inner-spin-button,
.ttlf-price-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.ttlf-price-input { -moz-appearance: textfield; }

/* ── Rating ── */
.ttlf-rating-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ttlf-rating-item { }
.ttlf-radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 5px 0;
    font-size: var(--ttlf-item-sz-pc, 13px);
    color: var(--ttlf-item-color, var(--ttlf-text));
}
.ttlf-radio-label input[type="radio"] { display: none; }
.ttlf-radio-dot {
    width: 16px; height: 16px;
    border: 2px solid var(--ttlf-border);
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--ttlf-trans);
}
.ttlf-radio-label input:checked ~ .ttlf-radio-dot {
    border-color: var(--ttlf-accent);
}
.ttlf-radio-label input:checked ~ .ttlf-radio-dot::after {
    content: '';
    width: 8px; height: 8px;
    background: var(--ttlf-accent);
    border-radius: 50%;
    display: block;
}
.ttlf-stars { display: flex; gap: 2px; }
.ttlf-star { font-size: 15px; line-height: 1; }
.ttlf-star.filled  { color: #f59e0b; }
.ttlf-star.empty   { color: #d1d5db; }
.ttlf-rating-suffix { font-size: 12px; color: var(--ttlf-muted); }

/* ── Actions ── */
.ttlf-fp-actions {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ttlf-apply-btn {
    width: 100%;
    padding: 13px;
    background: var(--ttlf-accent);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(195,0,122,.35);
    transition: background var(--ttlf-trans), transform var(--ttlf-trans);
    letter-spacing: .3px;
}
.ttlf-apply-btn:hover { background: var(--ttlf-accent2); transform: translateY(-1px); }
.ttlf-reset-btn {
    width: 100%;
    padding: 10px;
    background: none;
    color: var(--ttlf-muted);
    border: 1.5px solid var(--ttlf-border);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--ttlf-trans);
}
.ttlf-reset-btn:hover { border-color: var(--ttlf-accent); color: var(--ttlf-accent); }

/* =====================================================================
   PRODUCT ARCHIVE  [ttpixel_product_archive / ttpixel_shop / ttpixel_category etc.]
   ===================================================================== */

/*
 * FIX: On real WooCommerce archive/category/search pages the theme (or WC itself)
 * injects extra wrappers (.woocommerce, .products, etc.) that carry default
 * border/outline styles. These don't appear in Elementor preview but DO appear
 * on the live site. We reset them all here so only our intentional borders show.
 */
.ttlf-archive,
.ttlf-archive *,
.ttlf-grid,
.ttlf-grid > * {
    outline: none !important;
    /* Keep box-shadow resets for the wrapper only, not for children buttons/inputs */
}
.ttlf-archive,
.ttlf-grid {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Also neutralise any WooCommerce default wrappers that may appear alongside */
.woocommerce .ttlf-archive,
.woocommerce-page .ttlf-archive {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.ttlf-archive {
    --cols-desktop: 4;
    --cols-tablet:  3;
    --cols-mobile:  2;
    position: relative;
    font-family: var(--ttlf-font-family, 'Inter', 'Segoe UI', sans-serif);
    color: var(--ttlf-text);
}
.ttlf-archive-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}
.ttlf-result-count { font-size: 13px; color: var(--ttlf-muted); font-weight: 500; min-height: 18px; }
.ttlf-sort-select {
    padding: 7px 12px;
    border: 1.5px solid var(--ttlf-border);
    border-radius: 8px;
    font-size: 12px;
    font-family: inherit;
    background: var(--ttlf-surface);
    color: var(--ttlf-text);
    cursor: pointer;
    outline: none;
    transition: border-color var(--ttlf-trans);
    width: auto !important;
    min-width: 160px;
    max-width: 250px;
}
@media (max-width: 480px) {
    .ttlf-sort-select {
        min-width: 100%;
    }
}
.ttlf-sort-select:focus { border-color: var(--ttlf-accent); }

/* Loading */
.ttlf-loading-overlay {
    position: absolute; inset: 0;
    background: rgba(255,255,255,.75);
    display: flex; align-items: center; justify-content: center;
    z-index: 10; border-radius: var(--ttlf-radius);
    backdrop-filter: blur(3px);
}
.ttlf-spinner {
    width: 40px; height: 40px;
    border: 4px solid var(--ttlf-border);
    border-top-color: var(--ttlf-accent);
    border-radius: 50%;
    animation: ttlf-spin .75s linear infinite;
}
@keyframes ttlf-spin { to { transform: rotate(360deg); } }

/* Grid */
.ttlf-grid {
    display: grid;
    grid-template-columns: repeat(var(--cols-desktop), 1fr);
    gap: 18px;
    align-items: stretch;
    transition: opacity var(--ttlf-trans);
}
.ttlf-grid.ttlf-loading { opacity: .35; pointer-events: none; }

/* Equal height */
.ttlf-item {
    display: flex; flex-direction: column; height: 100%;
}
.ttlf-item > *,
.ttlf-item .elementor,
.ttlf-item .elementor-section-wrap,
.ttlf-item .e-loop-item,
.ttlf-item .elementor-widget-wrap,
.ttlf-item .elementor-container,
.ttlf-item .elementor-column,
.ttlf-item .elementor-column-wrap,
.ttlf-item .elementor-section,
.ttlf-item .e-con,
.ttlf-item .e-con-inner {
    display: flex; flex-direction: column; flex: 1; height: 100%;
}

/* Empty / notice */
.ttlf-no-products {
    text-align: center; padding: 50px 20px;
    color: var(--ttlf-muted); font-size: 15px; grid-column: 1/-1;
}
.ttlf-notice {
    padding: 16px; background: #fff8e1;
    border-left: 4px solid #ffc107; border-radius: 8px;
    font-size: 13px; grid-column: 1/-1;
}

/* Item animation */
.ttlf-item { animation: ttlf-fade-in .3s ease both; }
@keyframes ttlf-fade-in {
    from { opacity:0; transform:translateY(12px); }
    to   { opacity:1; transform:translateY(0); }
}

/* Fallback card */
.ttlf-fallback-card {
    border-radius: var(--ttlf-radius); overflow: hidden;
    background: var(--ttlf-surface); border: 1px solid var(--ttlf-border);
    display: flex; flex-direction: column; height: 100%;
    transition: transform var(--ttlf-trans), box-shadow var(--ttlf-trans);
}
.ttlf-fallback-card:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(0,0,0,.12); }
.ttlf-card-img-wrap { display: block; position: relative; overflow: hidden; aspect-ratio: 1; }
.ttlf-card-img-wrap img { width:100%; height:100%; object-fit:cover; }
.ttlf-badge-sale {
    position: absolute; top:8px; left:8px;
    background:#ef4444; color:#fff; font-size:10px; font-weight:700;
    padding:2px 8px; border-radius:999px;
}
.ttlf-card-body { padding:14px; flex:1; display:flex; flex-direction:column; }
.ttlf-card-title { margin:0 0 6px; font-size:14px; font-weight:600; line-height:1.4; }
.ttlf-card-title a { color:var(--ttlf-text); text-decoration:none; }
.ttlf-card-price { font-size:15px; font-weight:700; color:var(--ttlf-accent); margin-bottom:10px; }
.ttlf-card-btn {
    display:block; text-align:center; padding:9px;
    background:var(--ttlf-accent); color:#fff !important;
    border-radius:7px; font-size:12px; font-weight:600;
    text-decoration:none !important; transition:background var(--ttlf-trans);
    margin-top: auto;
}
.ttlf-card-btn:hover { background:var(--ttlf-accent2); }

/* Pagination */
.ttlf-pagination { display:flex; justify-content:center; gap:6px; margin-top:28px; flex-wrap:wrap; }
.ttlf-load-more-btn {
    padding: var(--lm-pad-y-pc, 12px) var(--lm-pad-x-pc, 30px);
    background: var(--lm-bg, var(--ttlf-accent));
    color: var(--lm-text, #ffffff);
    border: var(--lm-border-width, 0)px solid var(--lm-border, transparent);
    border-radius: 999px;
    font-size: var(--lm-font-sz-pc, 14px);
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,.15);
    transition: all var(--ttlf-trans);
}
.ttlf-load-more-btn:hover { 
    background: var(--lm-bg-hover, var(--ttlf-accent2)); 
    color: var(--lm-text-hover, #ffffff);
    border-color: var(--lm-border-hover, transparent);
    transform: translateY(-2px); 
}
.ttlf-load-more-btn.loading { opacity: 0.7; pointer-events: none; }

.ttlf-page-btn {
    width:36px; height:36px; display:inline-flex; align-items:center; justify-content:center;
    border:1.5px solid var(--ttlf-border); border-radius:7px;
    background: var(--num-bg, var(--ttlf-surface)); 
    color: var(--num-text, var(--ttlf-text));
    font-size:13px; font-weight:600; cursor:pointer; font-family:inherit;
    transition: all var(--ttlf-trans);
}
.ttlf-page-btn:hover,
.ttlf-page-btn.active { 
    background: var(--num-bg-hover, var(--ttlf-accent)); 
    border-color: var(--num-bg-hover, var(--ttlf-accent)); 
    color: var(--num-text-hover, #ffffff); 
}

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 1024px) {
    .ttlf-grid { grid-template-columns: repeat(var(--cols-tablet), 1fr); }
    .ttlf-section-title, .ttlf-fp-label { font-size: var(--ttlf-title-sz-tb, 14px); }
    .ttlf-check-label, .ttlf-check-name, .ttlf-radio-label, .ttlf-price-field label { font-size: var(--ttlf-item-sz-tb, 13px); }
    .ttlf-load-more-btn {
        padding: var(--lm-pad-y-tb, 12px) var(--lm-pad-x-tb, 30px);
        font-size: var(--lm-font-sz-tb, 14px);
    }
}

@media (max-width: 768px) {
    /* Show mobile toggle button */
    .ttlf-mobile-filter-btn { display: inline-flex; }

    /* Panel becomes fixed drawer */
    .ttlf-filter-panel {
        position: fixed;
        top: 0; left: -100%;
        width: min(320px, 90vw);
        height: 100dvh;
        overflow-y: auto;
        z-index: 1000;
        border-radius: 0;
        border: none;
        box-shadow: 4px 0 32px rgba(0,0,0,.18);
        transition: left .3s cubic-bezier(.4,0,.2,1);
    }
    .ttlf-filter-panel.open {
        left: 0;
    }
    .ttlf-panel-topbar { display: flex; }
    
    .ttlf-section-title, .ttlf-fp-label { font-size: var(--ttlf-title-sz-mb, 14px); }
    .ttlf-check-label, .ttlf-check-name, .ttlf-radio-label, .ttlf-price-field label { font-size: var(--ttlf-item-sz-mb, 13px); }
    .ttlf-load-more-btn {
        padding: var(--lm-pad-y-mb, 12px) var(--lm-pad-x-mb, 30px);
        font-size: var(--lm-font-sz-mb, 14px);
    }
}

@media (max-width: 600px) {
    .ttlf-grid { grid-template-columns: repeat(var(--cols-mobile), 1fr); gap: 10px; }
}

/* ================================================================
   Header Search Bars (Exact Match Designs)
================================================================ */
.ttlf-header-search-wrap {
    /* Full width of whatever container Elementor gives us */
    width: 100%;
    /* No max-width by default — controlled via shortcode max_width attr */
    box-sizing: border-box;
    font-family: inherit;
    /* CSS custom properties — overridable via shortcode attrs */
    --ttlf-search-h:      48px;
    --ttlf-search-fs:     15px;
    --ttlf-search-radius: 8px;
}

.ttlf-header-search-form .ttlf-search-inner {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    position: relative;
    transition: all 0.3s ease;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    /* Height controlled via CSS var (shortcode height attr) */
    min-height: var(--ttlf-search-h, 48px);
}

.ttlf-header-search-form .ttlf-search-field {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    border: none !important;
    background: transparent !important;
    padding: 0 20px !important;
    margin: 0 !important;
    font-size: var(--ttlf-search-fs, 15px) !important;
    outline: none !important;
    box-shadow: none !important;
    color: #333 !important;
    height: var(--ttlf-search-h, 48px) !important;
    line-height: var(--ttlf-search-h, 48px) !important;
}
.ttlf-header-search-form .ttlf-search-field::placeholder {
    color: #9ca3af !important;
}

.ttlf-header-search-form .ttlf-search-submit {
    flex-shrink: 0 !important;
    border: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transition: color 0.3s ease;
    height: var(--ttlf-search-h, 48px) !important;
    width: var(--ttlf-search-h, 48px) !important;
    flex-shrink: 0 !important;
}

/* Style 1: Soft Gray Background, Icon Right */
.ttlf-header-search-wrap.style-1 .ttlf-search-inner {
    background: #f4f5f7 !important;
    border-radius: var(--ttlf-search-radius, 8px) !important;
    padding: 0 6px 0 0 !important;
    border: none !important;
}
.ttlf-header-search-wrap.style-1 .ttlf-search-field {
    padding: 0 16px !important;
    background: transparent !important;
}
.ttlf-header-search-wrap.style-1 .ttlf-search-submit {
    color: #555 !important;
    border-radius: 0 var(--ttlf-search-radius, 8px) var(--ttlf-search-radius, 8px) 0 !important;
}
.ttlf-header-search-wrap.style-1 .ttlf-search-submit:hover {
    color: var(--ttlf-search-bg) !important;
}
.ttlf-header-search-wrap.style-1 .ttlf-search-inner:focus-within {
    box-shadow: 0 0 0 2px rgba(195,0,122,.18) !important;
}

/* Style 2: White Background, Border, Icon Right */
.ttlf-header-search-wrap.style-2 .ttlf-search-inner {
    background: #ffffff !important;
    border: 1.5px solid #e5e7eb !important;
    border-radius: var(--ttlf-search-radius, 8px) !important;
    padding: 0 !important;
}
.ttlf-header-search-wrap.style-2 .ttlf-search-inner:focus-within {
    border-color: var(--ttlf-search-bg) !important;
    box-shadow: 0 0 0 3px rgba(195,0,122,.10) !important;
}
.ttlf-header-search-wrap.style-2 .ttlf-search-field {
    padding: 0 20px !important;
}
.ttlf-header-search-wrap.style-2 .ttlf-search-submit {
    color: #666 !important;
    border-left: 1px solid #e5e7eb !important;
    border-radius: 0 var(--ttlf-search-radius, 8px) var(--ttlf-search-radius, 8px) 0 !important;
}
.ttlf-header-search-wrap.style-2 .ttlf-search-submit:hover {
    color: var(--ttlf-search-bg) !important;
    background: #fafafa !important;
}

/* Style 3: Pill Shape, Categories Dropdown Left, Icon Right */
.ttlf-header-search-wrap.style-3 .ttlf-search-inner {
    background: #ffffff !important;
    border: 1.5px solid #e5e7eb !important;
    border-radius: var(--ttlf-search-radius, 999px) !important;
    padding: 0 6px !important;
}
.ttlf-header-search-wrap.style-3 .ttlf-search-inner:focus-within {
    border-color: var(--ttlf-search-bg) !important;
    box-shadow: 0 0 0 3px rgba(195,0,122,.10) !important;
}
.ttlf-header-search-wrap.style-3 .ttlf-search-cat-wrap {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    padding-left: 10px !important;
    flex-shrink: 0 !important;
}
.ttlf-header-search-wrap.style-3 .ttlf-search-cat {
    appearance: none !important;
    -webkit-appearance: none !important;
    border: none !important;
    background: transparent !important;
    font-size: var(--ttlf-search-fs, 14px) !important;
    color: #333 !important;
    padding: 0 22px 0 0 !important;
    margin: 0 !important;
    outline: none !important;
    cursor: pointer !important;
    box-shadow: none !important;
    height: var(--ttlf-search-h, 48px) !important;
}
.ttlf-header-search-wrap.style-3 .ttlf-cat-chevron {
    position: absolute !important;
    right: 2px !important;
    pointer-events: none !important;
    color: #666 !important;
}
.ttlf-header-search-wrap.style-3 .ttlf-search-divider {
    width: 1px !important;
    height: 60% !important;
    background: #e5e7eb !important;
    margin: 0 8px !important;
    flex-shrink: 0 !important;
}
.ttlf-header-search-wrap.style-3 .ttlf-search-field {
    padding: 0 10px !important;
}
.ttlf-header-search-wrap.style-3 .ttlf-search-submit {
    color: #555 !important;
    border-radius: 0 var(--ttlf-search-radius, 999px) var(--ttlf-search-radius, 999px) 0 !important;
}
.ttlf-header-search-wrap.style-3 .ttlf-search-submit:hover {
    color: var(--ttlf-search-bg) !important;
}

/* Style 4: Gray Background, Icon Left */
.ttlf-header-search-wrap.style-4 .ttlf-search-inner {
    background: #f3f4f6 !important;
    border-radius: var(--ttlf-search-radius, 8px) !important;
    padding: 0 14px !important;
    border: none !important;
}
.ttlf-header-search-wrap.style-4 .ttlf-search-inner:focus-within {
    box-shadow: 0 0 0 2px rgba(195,0,122,.18) !important;
}
.ttlf-header-search-wrap.style-4 .ttlf-search-icon-left {
    color: #6b7280 !important;
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
}
.ttlf-header-search-wrap.style-4 .ttlf-search-field {
    padding: 0 14px !important;
}

/* =====================================================================
   CATEGORY NAV  [ttpixel_category_nav]
   ===================================================================== */

/* ── CSS Custom Properties ── */
.ttlf-cat-nav {
    --ttlf-cn-accent:  #c3007a;
    --ttlf-cn-text:    #2d3436;
    --ttlf-cn-fs:      14px;
    --ttlf-cn-radius:  999px;
    --ttlf-cn-cols:    4;
    font-family: var(--ttlf-font-family, 'Inter', 'Segoe UI', sans-serif);
}

/* ── Pills style (default) ── */
.ttlf-cat-nav--pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.ttlf-cn-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 18px;
    border-radius: var(--ttlf-cn-radius);
    font-size: var(--ttlf-cn-fs);
    font-weight: 600;
    color: var(--ttlf-cn-text);
    background: #f3f4f6;
    border: 1.5px solid #eaeaee;
    text-decoration: none !important;
    transition: all .2s ease;
    white-space: nowrap;
    line-height: 1.2;
}
.ttlf-cn-pill:hover,
.ttlf-cn-pill.active {
    background: var(--ttlf-cn-accent);
    border-color: var(--ttlf-cn-accent);
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(195,0,122,.25);
}
.ttlf-cn-pill--all {
    background: var(--ttlf-cn-accent);
    border-color: var(--ttlf-cn-accent);
    color: #fff !important;
}
.ttlf-cn-pill--all:hover {
    opacity: .88;
}

.ttlf-cn-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.10);
    color: inherit;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    padding: 1px 7px;
    min-width: 22px;
    height: 20px;
    line-height: 1;
}
.ttlf-cn-pill:hover .ttlf-cn-count,
.ttlf-cn-pill.active .ttlf-cn-count,
.ttlf-cn-pill--all .ttlf-cn-count {
    background: rgba(255,255,255,.25);
}

/* ── Grid style ── */
.ttlf-cat-nav--grid {
    display: grid;
    grid-template-columns: repeat(var(--ttlf-cn-cols), 1fr);
    gap: 14px;
}
.ttlf-cat-nav--grid .ttlf-cn-pill {
    flex-direction: column;
    text-align: center;
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
    gap: 0;
    background: #fff;
}
.ttlf-cat-nav--grid .ttlf-cn-pill:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(195,0,122,.20);
    background: #fff;
    color: var(--ttlf-cn-accent) !important;
    border-color: var(--ttlf-cn-accent);
}
.ttlf-cn-pill-img {
    width: 100%;
    padding-top: 70%;
    background-size: cover;
    background-position: center;
    display: block;
    border-radius: 0;
}
.ttlf-cn-pill-name {
    display: block;
    padding: 10px 12px 12px;
    font-size: var(--ttlf-cn-fs);
    font-weight: 600;
    color: inherit;
    line-height: 1.3;
}
.ttlf-cat-nav--grid .ttlf-cn-count {
    margin: 0 12px 10px;
    background: rgba(195,0,122,.10);
    color: var(--ttlf-cn-accent);
    align-self: flex-start;
}
.ttlf-cat-nav--grid .ttlf-cn-pill--all .ttlf-cn-pill-img {
    background: linear-gradient(135deg, var(--ttlf-cn-accent) 0%, #ff6eb0 100%);
}

/* Responsive grid */
@media (max-width: 1024px) {
    .ttlf-cat-nav--grid {
        grid-template-columns: repeat(calc(var(--ttlf-cn-cols) - 1), 1fr);
    }
}
@media (max-width: 600px) {
    .ttlf-cat-nav--grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .ttlf-cat-nav--pills {
        gap: 6px;
    }
    .ttlf-cn-pill {
        padding: 6px 14px;
        font-size: 13px;
    }
}

/* ── Dropdown style ── */
.ttlf-cn-dropdown-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 320px;
}
.ttlf-cn-dropdown-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--ttlf-cn-text);
    opacity: .7;
    letter-spacing: .5px;
    text-transform: uppercase;
}
.ttlf-cn-select-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.ttlf-cn-select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    padding: 11px 42px 11px 16px;
    border: 1.5px solid #eaeaee;
    border-radius: 10px;
    font-size: var(--ttlf-cn-fs);
    font-family: inherit;
    font-weight: 600;
    color: var(--ttlf-cn-text);
    background: #fff;
    cursor: pointer;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.ttlf-cn-select:focus {
    border-color: var(--ttlf-cn-accent);
    box-shadow: 0 0 0 3px rgba(195,0,122,.12);
}
.ttlf-cn-chevron {
    position: absolute;
    right: 14px;
    pointer-events: none;
    color: var(--ttlf-cn-text);
    opacity: .5;
    transition: transform .2s ease;
}
.ttlf-cn-select:focus + .ttlf-cn-chevron {
    transform: rotate(180deg);
    color: var(--ttlf-cn-accent);
    opacity: 1;
}

/* ── List style ── */
.ttlf-cn-list {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ttlf-cn-list-item { }
.ttlf-cn-list-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: var(--ttlf-cn-fs);
    font-weight: 500;
    color: var(--ttlf-cn-text) !important;
    text-decoration: none !important;
    transition: all .18s ease;
    border-left: 3px solid transparent;
}
.ttlf-cn-list-link:hover {
    background: rgba(195,0,122,.07);
    border-left-color: var(--ttlf-cn-accent);
    color: var(--ttlf-cn-accent) !important;
    padding-left: 18px;
}
.ttlf-cn-list-link .ttlf-cn-count {
    background: rgba(0,0,0,.07);
    color: var(--ttlf-cn-text);
    opacity: .7;
}
.ttlf-cn-list-link:hover .ttlf-cn-count {
    background: rgba(195,0,122,.12);
    color: var(--ttlf-cn-accent);
    opacity: 1;
}
