/* ============================================
   FABRICATIONS SEARCH WIDGET & GRID CSS
   Responsive layout for search widget and product grid
   Same fixes as belts-search.css, adapted for fabrications
   ============================================ */

/* ============================================
   FABRICATIONS PAGE SPECIFIC: Search Controls Positioning
   ============================================ */

/* Prevent search controls from going behind header on mobile */
@media (max-width: 767px) {
    .search-controls {
        position: relative !important;
        z-index: 1 !important;
        margin-top: 20px !important;
        padding-top: 10px !important;
    }
    
    /* Ensure search widget doesn't overlap header */
    #search-widget-div {
        margin-top: 20px !important;
    }

}
    .search-controls button 
{
        transform: none !important;
    transition: background-color 0.3s ease, box-shadow 0.3s ease !important;
    transform: none !important;
    box-shadow: 0 4px 12px rgba(0, 131, 69, 0.4) !important;
}
/* ============================================
   FIX: PRODUCT GRID OVERFLOW (FABRICATIONS PAGE ONLY)
   Ensures grid stays within viewport boundaries
   ============================================ */

/* Prevent any horizontal scrolling at page level */
html {
    overflow-x: hidden !important;
    max-width: 100vw !important;
}

body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
}

/* Ensure ALL Elementor sections don't overflow */
.elementor-section,
.e-con,
.elementor-container {
    overflow-x: hidden !important;
 
    box-sizing: border-box !important;
}

/* ============================================
   DESKTOP GRID LAYOUT (>=1025px)
   3 columns with adjusted proportions
   ============================================ */
@media (min-width: 1025px) {
    /* Let the loop grid auto-expand to 4–5 columns as space allows */
    .elementor-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
        gap: 20px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }
    
    /* Adjust column widths to give grid more room */
    #search-widget-div {
        width: 32% !important;
        max-width: 32% !important;
        min-width: 32% !important;
        flex: 0 0 32% !important;
    }
    
    #search-data-div {
        width: 68% !important;
        max-width: 68% !important;
        min-width: 68% !important;
        flex: 0 0 68% !important;
    }
    
    /* Reduce parent container gap to give grid more breathing room */
    #search-parent .e-con-inner {
        gap: 10px !important;
    }
    
    #search-data-div {
        padding-left: 5px !important;
        padding-right: 10px !important;
    }
}

/* ============================================
   INTERMEDIATE DESKTOP (1025px - 1280px)
   Ensure grid items don't get truncated
   ============================================ */
@media (min-width: 1025px) and (max-width: 1280px) {
    .elementor-grid {
        grid-template-columns: repeat(3, minmax(250px, 1fr)) !important;
        gap: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Adjust proportions for narrower screens - give grid even more room */
    #search-widget-div {
        width: 28% !important;
        max-width: 28% !important;
        min-width: 28% !important;
        flex: 0 0 28% !important;
    }
    
    #search-data-div {
        width: 72% !important;
        max-width: 72% !important;
        min-width: 72% !important;
        flex: 0 0 72% !important;
    }
    
    /* Reduce gap even more */
    #search-parent .e-con-inner {
        gap: 8px !important;
    }
}

/* ============================================
   NARROW DESKTOP (1280px - 1440px)
   Additional breakpoint for better scaling
   ============================================ */
@media (min-width: 1280px) and (max-width: 1440px) {
    .elementor-grid {
        grid-template-columns: repeat(3, minmax(280px, 1fr)) !important;
        gap: 18px !important;
    }
    
    #search-widget-div {
        width: 30% !important;
        max-width: 30% !important;
        min-width: 30% !important;
        flex: 0 0 30% !important;
    }
    
    #search-data-div {
        width: 70% !important;
        max-width: 70% !important;
        min-width: 70% !important;
        flex: 0 0 70% !important;
    }
}

/* ============================================
   TABLET GRID LAYOUT (768px - 1024px)
   2 columns with adjusted widths
   ============================================ */
@media (min-width: 768px) and (max-width: 1024px) {
    .elementor-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 20px !important;
        max-width: 100% !important;
    }
    
    #search-data-div {
        padding-left: 10px !important;
        padding-right: 15px !important;
    }
}

/* ============================================
   MOBILE GRID LAYOUT (<768px)
   Single column, centered
   ============================================ */
@media (max-width: 767px) {
    .elementor-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        justify-items: center !important;
    }
    
    /* Center individual grid items */
    .elementor-grid > * {
        width: 100% !important;
        max-width: 400px !important;
        margin: 0 auto !important;
    }
    
    #search-data-div {
        padding-left: 10px !important;
        padding-right: 10px !important;
        display: flex !important;
        justify-content: center !important;
    }
    
    /* Ensure loop container is centered */
    .elementor-loop-container,
    .e-loop-container,
    .fabrications-loop-grid {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
    }
}

/* Ensure product cards don't overflow */
.elementor-grid > * {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Fix for search results container */
#search-data-div {
    padding-left: 10px !important;
    padding-right: 10px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    max-width: 100% !important;
}

/* Force the parent container to not expand beyond viewport */
#search-parent {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

/* CRITICAL: Force loop widget and container to respect boundaries */
.fabrications-loop-grid,
.fabrications-loop-grid .elementor-widget-container,
.fabrications-loop-grid .elementor-loop-container {
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

/* Override Elementor's grid classes completely */
.elementor-grid.elementor-grid-3,
.elementor-grid.elementor-grid-tablet-2,
.elementor-grid.elementor-grid-mobile-1 {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Ensure grid items have proper width constraints */
.elementor-grid .elementor-post {
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* ============================================
   UNIFIED RESPONSIVE LAYOUT (Desktop & Tablet)
   Side-by-side on screens >= 1025px
   UPDATED: More aggressive to override Elementor inline styles
   ============================================ */
@media (min-width: 1025px) {
    /* Force flex layout on parent */
    #search-parent,
    #search-parent.e-con,
    #search-parent .e-con-inner {
        display: flex !important;
        flex-direction: row !important;
        gap: 50px !important;
        align-items: flex-start !important;
        flex-wrap: nowrap !important;
    }

    /* Search widget column */
    #search-widget-div,
    #search-widget-div.e-con {
        width: 35% !important;
        max-width: 35% !important;
        min-width: 35% !important;
        flex: 0 0 35% !important;
        flex-grow: 0 !important;
        flex-shrink: 0 !important;
    }

    /* Grid column */
    #search-data-div,
    #search-data-div.e-con {
        width: 65% !important;
        max-width: 65% !important;
        min-width: 65% !important;
        flex: 0 0 65% !important;
        flex-grow: 0 !important;
        flex-shrink: 0 !important;
    }
}

/* ============================================
   TABLET LAYOUT (768px - 1024px)
   Stack vertically below 1025px
   UPDATED: More specific selectors
   ============================================ */
@media (min-width: 768px) and (max-width: 1024px) {
    /* Force column layout */
    #search-parent,
    #search-parent.e-con,
    #search-parent .e-con-inner {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
    }
    
    /* Both children full width */
    #search-widget-div,
    #search-widget-div.e-con,
    #search-data-div,
    #search-data-div.e-con {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        flex: 1 1 100% !important;
        flex-basis: 100% !important;
    }

    #search-parent .e-con-inner,
    #search-parent.e-con {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    
    #search-widget-div,
    #search-data-div {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    #search-widget-div,
    #search-widget-div.e-con {
        margin-bottom: 15px !important;
    }
}

/* ============================================
   MOBILE LAYOUT (<768px)
   Stack vertically, minimal spacing
   UPDATED: Maximum specificity + CENTERED
   ============================================ */
@media (max-width: 767px) {
    /* Force column direction */
    #search-parent,
    #search-parent.e-con,
    #search-parent.e-con-full,
    #search-parent .e-con-inner {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
        max-width: 100% !important;
        align-items: center !important;
        justify-content: flex-start !important;
    }
    
    /* Both children full width - ULTRA SPECIFIC */
    #search-widget-div,
    #search-widget-div.e-con,
    #search-widget-div.e-con-full,
    #search-data-div,
    #search-data-div.e-con,
    #search-data-div.e-con-full {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        flex: 1 1 100% !important;
        flex-basis: 100% !important;
        flex-grow: 0 !important;
        flex-shrink: 0 !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* Ensure parent uses full width */
    #search-parent {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Remove any offset margins except centering */
    #search-parent .e-con-inner,
    #search-parent.e-con {
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    /* Search widget and grid: symmetric padding + centered */
    #search-widget-div,
    #search-data-div {
        padding-left: 15px !important;
        padding-right: 15px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* Ensure widgets don't overflow */
    #fabrications-search-widget {
        padding-left: 10px !important;
        padding-right: 10px !important;
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    #search-widget-div,
    #search-widget-div.e-con {
        margin-bottom: 10px !important;
    }
}

/* ============================================
   PREVENT OVERFLOW & ENSURE BOX MODEL
   ============================================ */
#search-widget-div,
#search-data-div,
.elementor-grid,
.elementor-grid > * {
    box-sizing: border-box !important;
}

/* Force strict width constraints on grid items */
.elementor-grid > * {
    max-width: 100% !important;
    overflow: hidden !important;
}

/* ============================================
   FABRICATIONS-SPECIFIC WIDGET STYLES
   (From your existing CSS)
   ============================================ */

#fabrications-search-widget {
    width: 100%;
    max-height: 120vh;
    overflow-y: auto;
    padding: 15px;
    box-sizing: border-box;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
}

#fabrications-search-widget fieldset {
    margin-bottom: 1em;
    border: 1px solid #ccc;
    padding: 10px;
    box-sizing: border-box;
}

#fabrications-search-widget legend {
    font-weight: bold;
    font-size: 0.9em;
    background-color: #018345;
    border-radius: 8px;
    color: #FFFFFF;
    padding: 4px 8px;
    margin-bottom: 5px;
    cursor: pointer;
}

#fabrications-search-widget label {
    display: flex;
    align-items: center;
    margin-bottom: 0.5em;
    cursor: pointer;
}

#fabrications-search-widget input[type="checkbox"] {
    margin-right: 10px;
}

#fabrications-search-widget button {
    background-color: #0073aa;
    color: #fff;
    border: none;
    padding: 0.5em 1em;
    cursor: pointer;
    width: 100%;
    border-radius: 5px;
}

#fabrications-search-widget input[type="range"] {
    width: calc(100% - 10px);
    margin: 5px;
}

.fabrications-search-filter {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #ddd;
    background-color: #fff;
    margin-bottom: 15px;
    border-radius: 5px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
}

.fabrications-search-widget fieldset legend {
    font-size: 14px;
    font-weight: bold !important;
    color: #008345;
    padding: 8px 12px;
    margin-bottom: 15px;
    border-bottom: 2px solid #0073aa;
    text-transform: uppercase;
}

.fabrication-type_filter_box.asp_sett_scroll,
.fabrication_color_filter_box.asp_sett_scroll {
    max-height: none !important;
    overflow: visible !important;
}

.fabrication-type_filter_box,
.fabrication_color_filter_box {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.fabrication-type_filter_box .asp_option,
.fabrication_color_filter_box .asp_option {
    display: flex;
    align-items: center;
}

fieldset legend {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    color: #008345;
    background-color: #FFFFFF;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold !important;
    padding: 8px 12px;
    margin-bottom: 15px;
    border-bottom: 2px solid #0073aa;
    text-transform: uppercase;
}

fieldset legend::after {
    content: "▼";
    font-size: 14px;
    margin-left: 10px;
    transition: transform 0.3s ease;
}

fieldset.open legend::after {
    transform: rotate(180deg);
}

fieldset.slider-filter legend::after {
    content: none;
}

.range-slider {
    margin: 20px auto;
    height: 300px;
    width: calc(100% - 30px) !important; /* Nearly full width minus padding */
    max-width: 100% !important;
    min-width: 180px !important; /* Minimum usable width */
}

/* Ensure slider container has proper layout */
fieldset.slider-filter {
    height: auto !important;
    min-height: 200px !important;
    padding: 15px 20px !important; /* More horizontal padding */
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important; /* Stretch to full width */
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Wrapper for slider content */
fieldset.slider-filter > * {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Ensure noUiSlider base maintains size */
.noUi-target {
    background: #ccc;
    border-radius: 5px;
    height: 6px;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 180px !important;
    box-sizing: border-box !important;
}

/* Slider pips (scale markers) should span full width */
.noUi-pips {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Responsive slider sizing - maintain proportions */
@media (max-width: 1440px) {
    .range-slider {
        width: calc(100% - 25px) !important;
    }
}

@media (max-width: 1024px) {
    .range-slider {
        width: calc(100% - 20px) !important;
        min-width: 160px !important;
    }
    
    fieldset.slider-filter {
        padding: 15px !important;
        min-height: 190px !important;
    }
}

@media (max-width: 767px) {
    .range-slider {
        width: calc(100% - 15px) !important;
        min-width: 140px !important;
    }
    
    fieldset.slider-filter {
        padding: 12px !important;
        min-height: 180px !important;
    }
}

/* Ensure parent fieldset doesn't constrain slider */
#fabrications-search-widget fieldset.slider-filter {
    width: 100% !important;
    overflow: visible !important;
}

.slider-values span {
    color: #018345;
    font-weight: bold;
    margin: 0 5px;
}

.noUi-connect {
    background: #018345;
}

.noUi-handle {
    width: 8px;
    height: 10px;
    background: #018345;
    border: 2px solid #e3e2ad;
    cursor: pointer;
}

.status-container {
    display: flex;
    justify-content: center;
}

.status-text {
    text-align: center;
    font-size: 0.9em;
    font-weight: 500;
    color: #830137;
}

.noUi-tooltip {
    display: none;
}

.noUi-active .noUi-tooltip {
    display: block;
}

.slider-values {
    display: flex;
    color: #018345;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

.slider-values > * {
    margin: 0 5px;
}

#search-status-popup {
    display: none;
    text-align: center;
}

.loader {
    border: 6px solid #ccc;
    border-top: 6px solid #0073aa;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.accordion-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.accordion-controls img {
    width: 24px;
    height: 24px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.accordion-controls img:hover {
    opacity: 0.7;
}

fieldset.slider-filter legend {
    padding-left: 10px;
    padding-right: 10px;
    pointer-events: none;
    cursor: default;
}

fieldset {
    overflow: hidden;
}

fieldset:not(.slider-filter) > *:not(legend, .status-text) {
    display: none;
}

fieldset.open > *:not(legend, .status-text) {
    display: block;
}

#reset-search {
    background-color: #d9534f;
}

.search-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
}

.search-controls button {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    transition: 0.3s;
}

.search-controls button:hover {
    background-color: #005f8c;
}

.search-controls img {
    width: 28px;
    height: 28px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.search-controls img:hover {
    opacity: 0.7;
}

.noUi-pips {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.noUi-value {
    font-size: 12px;
    color: #018345;
    margin-top: 5px;
}

fieldset.slider-filter {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.fabrications-loop-grid {
    min-height: 300px;
    min-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.e-loop-nothing-found-message {
    background-color: blanchedalmond;
    font-size: 50px;
    font-weight: 500;
}

#general-search-fieldset {
    display: block !important;
    visibility: visible !important;
}

#general_search {
    padding-left: 30px;
    background-repeat: no-repeat;
    background-position: 5px center;
    background-size: 20px;
}

.hidden {
    display: none;
}

.search-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9000;
    justify-content: center;
    align-items: center;
}

.search-modal-content {
    position: absolute;
    background: white;
    font-family: Arial, sans-serif;
    top: 10%;
    left: 50%;
    transform: translate(-50%, 0);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 80%;
}

.search-modal-overlay.visible {
    display: flex;
}

#search-summary {
    list-style-type: none;
    padding: 0;
}

#search-summary ul {
    margin: 5px 0 10px 25px;
    padding-left: 0;
}

.search-summary-inline {
    display: block;
    margin-left: 25px;
}

.search-modal-content h2 {
    font-size: 22px;
    margin-bottom: 10px;
}

.search-modal-content ul {
    list-style-type: none;
    padding: 0;
    text-align: left;
}

.search-modal-content ul li {
    margin-bottom: 5px;
}

.no-results-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.no-results-modal-overlay.visible {
    display: flex;
}

.no-results-modal-content {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translate(-50%, 0);
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 80%;
    text-align: center;
}

.no-results-modal-button {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 15px;
}

.no-results-modal-button:hover {
    background: #0056b3;
}

.unit-system-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 10px;
    text-align: center;
    width: 100%;
}

.unit-label {
    margin-right: 5px;
}

.unit-option {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    white-space: nowrap;
}

.unit-option input[type="radio"] {
    cursor: pointer;
}

#unit-toggle {
    display: block;
    text-align: center;
    margin-bottom: 15px;
}

.go-to-typeahead {
    position: relative;
    width: 100%;
    max-width: 620px;
}

#go-to-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    background: #fff;
    border: 1px solid #ccc;
    border-top: none;
    z-index: 1000;
    max-height: 360px;
    overflow-y: auto;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

#go-to-suggestions.visible { 
    display: block; 
}

.go-to-item {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
    padding: 8px 10px;
    align-items: start;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.go-to-item:last-child { 
    border-bottom: none; 
}

.go-to-item .go-to-col {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.go-to-item .go-to-desc {
    color: #333;
    font-weight: 500;
}

.go-to-item .go-to-title {
    text-align: right;
    font-weight: 700;
    color: #018345;
}

.go-to-item:hover,
.go-to-item.active {
    background: #f4f9f6;
}

.go-to-item.active .go-to-title {
    color: #018345;
}

.go-to-typeahead .go-to-select {
    width: 100%;
    padding: 7px 8px;
    font-size: 16px;
    color: inherit;
    border: 1px solid #000;
    border-radius: 5px;
    background-color: #fff;
}

.go-to-typeahead .go-to-select:focus {
    box-shadow: 0 0 3px 0 #3f69a8;
    border-color: #3f69a8;
    outline: none;
}

#go-to-fabrication-fieldset {
    position: relative;
    overflow: visible !important;
    z-index: 5;
}

.go-to-typeahead {
    position: relative;
}

#go-to-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #fff;
    border: 1px solid #ccc;
    border-top: none;
    box-shadow: 0 6px 18px rgba(0,0,0,.12);
    max-height: 360px;
    overflow-y: auto;
}

#go-to-fabrication-fieldset .go-to-row {
    margin-bottom: 6px;
}

#go-to-suggestions-portal {
    position: fixed;
    display: none;
    background: #fff;
    border: 1px solid #ccc;
    border-top: none;
    box-shadow: 2px 6px 18px rgba(0,0,0,0.12);
    max-height: 60vh;
    overflow-y: auto;
    z-index: 99999;
    border-radius: 4px;
}

#go-to-suggestions-portal .go-to-item {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
    padding: 8px 10px;
    align-items: start;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

#go-to-suggestions-portal .go-to-item:last-child { 
    border-bottom: none; 
}

#go-to-suggestions-portal .go-to-col {
    overflow: hidden; 
    text-overflow: ellipsis; 
    white-space: nowrap;
}

#go-to-suggestions-portal .go-to-desc  { 
    color:#333; 
    font-weight:500; 
}

#go-to-suggestions-portal .go-to-title { 
    text-align:right; 
    font-weight:700; 
    color:#018345; 
}

#go-to-suggestions-portal .go-to-item:hover,
#go-to-suggestions-portal .go-to-item.active { 
    background:#f4f9f6; 
}

#go-to-suggestions-portal .go-to-item.active .go-to-title { 
    color:#018345; 
}


.sidebar-panel {
  transition: all 0.4s ease;
}
.sidebar-panel.collapsed {
  width: 0 !important;
  overflow: hidden;
}
/* =====================================================================
   Mulhern Fabrications: Pin/Unpin + Drag Resize (BEST)
   - Fixes: disappearing widget, non-working resize due to fixed % widths
   - Uses CSS variables controlled by JS
   ===================================================================== */

#search-widget-div{position:relative !important;}

/* Pin button */
#search-widget-div .mb-pin-btn{
  position:absolute !important;
  top:8px !important;
  right:22px !important; /* leave room for resize handle */
  z-index:50 !important;
  width:28px !important;
  height:28px !important;
  border:1px solid rgba(0,0,0,0.15) !important;
  border-radius:6px !important;
  background:#fff !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  cursor:pointer !important;
  padding:0 !important;
}
#search-widget-div .mb-pin-btn:focus{outline:2px solid rgba(0,131,69,0.35) !important; outline-offset:2px !important;}
#search-widget-div .mb-pin-btn .mb-pin-icon{display:block !important; line-height:1 !important; font-size:18px !important;}
#search-widget-div .mb-pin-btn[aria-pressed="true"] .mb-pin-icon::before{content:"📌";}
#search-widget-div .mb-pin-btn[aria-pressed="false"] .mb-pin-icon::before{content:"📍";}

/* Resize handle: always visible */
#search-widget-div .mb-resize-handle{
  position:absolute !important;
  top:0 !important;
  right:0 !important;
  bottom:0 !important;
  width:14px !important;
  z-index:40 !important;
  cursor:ew-resize !important;
  touch-action:none !important;
  user-select:none !important;
  background:linear-gradient(to left, rgba(0,0,0,0.12), rgba(0,0,0,0)) !important;
}
#search-widget-div .mb-resize-handle::after{
  content:"";
  position:absolute;
  top:50%;
  left:50%;
  width:4px;
  height:44px;
  transform:translate(-50%,-50%);
  border-radius:3px;
  background:rgba(0,0,0,0.25);
  box-shadow:0 -10px 0 rgba(0,0,0,0.25), 0 10px 0 rgba(0,0,0,0.25);
}

/* Collapsed behavior: keep a 60px rail visible */
#search-widget-div.mb-unpinned{
  overflow:hidden !important;
}
#search-widget-div.mb-unpinned .search-controls,
#search-widget-div.mb-unpinned #fabrications-search-widget{
  opacity:0 !important;
  pointer-events:none !important;
}
#search-widget-div.mb-unpinned .mb-pin-btn{
  left:0 !important;
  right:0 !important;
  margin-left:auto !important;
  margin-right:auto !important;
}

/* Layout sizing override (this is what makes drag-resize actually work) */
#search-parent{
  --mb-sw-width: 320px;
  --mb-sw-collapsed: 60px;
  --mb-sw-height: 520px;
}

@media (min-width: 768px){
  #search-parent{
    display:flex !important;
    align-items:flex-start !important;
    gap:20px !important;
  }

  /* Sidebar width is controlled by --mb-sw-width */
  #search-parent #search-widget-div{
    flex:0 0 var(--mb-sw-width) !important;
    width:var(--mb-sw-width) !important;
    max-width:420px !important;
    min-width:60px !important;
  }
  #search-parent #search-widget-div.mb-unpinned{
    flex:0 0 var(--mb-sw-collapsed) !important;
    width:var(--mb-sw-collapsed) !important;
  }

  /* Results always take the remaining space */
  #search-parent #search-data-div{
    flex:1 1 auto !important;
    width:auto !important;
    max-width:none !important;
    min-width:0 !important;
  }
}

@media (max-width: 1024px){
  /* Tablet + Mobile: pin/unpin only (no resizing handle) */
  #search-widget-div .mb-resize-handle{display:none !important;}

  #search-parent{display:block !important;}
  #search-parent #search-widget-div{width:100% !important; max-width:100% !important;}

  /* Pinned: natural height (no forced max-height) */
  #search-parent #search-widget-div.mb-pinned{
    height:auto !important;
    max-height:none !important;
  }

  /* Unpinned: collapse to a small header strip */
  #search-parent #search-widget-div.mb-unpinned{
    height:60px !important;
    max-height:60px !important;
    overflow:hidden !important;
  }

  /* Make it obvious how to restore */
  #search-widget-div.mb-unpinned .mb-pin-btn{
    top:50% !important;
    transform:translateY(-50%) !important;
    right:12px !important;
  }
}

body.mb-resizing, body.mb-resizing *{cursor:ew-resize !important;}

/* =============================
   Desktop gutters + loop-grid auto columns
   ============================= */

@media (min-width: 1025px){
  /* Keep consistent white space (gutters) as sidebar is resized */
  #search-parent,
  #search-parent.e-con,
  #search-parent .e-con-inner{
    max-width: 1400px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 32px !important;
    padding-right: 32px !important;
    box-sizing: border-box !important;
  }

  /* Remove asymmetrical Elementor padding that makes the right side feel cramped */
  #fabrications-spec-loop > .elementor-widget-container{
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Let the grid add columns automatically when more width is available */
  #fabrications-spec-loop .elementor-loop-container.elementor-grid{
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
  }
}
/* RE-ENABLE Elementor sticky spacer (required for sticky header/nav to work) */
.elementor-sticky__spacer {
  display: block !important;
  height: auto !important;
}
