    /* === FIX 1: Buy form select height === */
.gs-quote-widget .gs-form-grid select {
    height: auto;
    min-height: 42px;
    line-height: 1.4;
    padding: 10px 32px 10px 12px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
}
/* Kill bottom padding on the widget itself and any direct WordPress block ancestor */
.gs-quote-widget,
.gs-quote-widget > .wp-block-group__inner-container,
.wp-block-group:has(.gs-quote-widget),
.wp-block-group:has(> .gs-quote-widget),
.wp-block-group .wp-block-group:has(.gs-quote-widget) {
    margin-bottom: 0 !important;
    padding-bottom: 6px !important;padding-top:6px!important;
}

/* Also handle the case where it's set via the WP spacing CSS variable */
.gs-quote-widget,
.wp-block-group:has(.gs-quote-widget) {
    --wp--preset--spacing--30: 0 !important;
}
/* === FIX 2: View matches hover stays white === */
.gs-quote-widget .gs-cta,
.gs-quote-widget .gs-cta:link,
.gs-quote-widget .gs-cta:visited,
.gs-quote-widget .gs-cta:hover,
.gs-quote-widget .gs-cta:focus,
.gs-quote-widget .gs-cta:active {
    color: #ffffff !important;
}
.gs-quote-widget .gs-cta:hover {
    background: #1a3d63;
}
.gs-quote-widget .gs-cta .gs-cta-text {
    color: #ffffff;
}
    /* ===== Generator Source Quote Widget ===== */
    .gs-quote-widget {
        max-width: 1100px;
        margin: 0 auto;
        font-family: inherit;
        color: #1f2937;
    }
    .gs-quote-widget *, .gs-quote-widget *::before, .gs-quote-widget *::after {
        box-sizing: border-box;
    }

    .gs-strip {
        background: #ffffff;
        border: 1px solid #e8eaed;
        border-radius: 14px;
        overflow: hidden;
        transition: box-shadow 0.25s ease;
    }
    .gs-strip[data-state="open"] {
        box-shadow: 0 1px 3px rgba(15, 45, 80, 0.04), 0 4px 16px rgba(15, 45, 80, 0.06);
    }

    /* Tab row */
    .gs-tabrow {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
    }
    .gs-tab {
        background: transparent;
        border: 0;
        border-right: 1px solid #f0f1f3;
        padding: 7px 18px 11px;
        cursor: pointer;
        text-align: left;
        font-family: inherit;
        transition: background 0.15s ease;
        position: relative;
    }
    .gs-tab::after {
        content: '';
        position: absolute;
        left: 0; right: 0; bottom: 0;
        height: 2px;
        background: transparent;
        transition: background 0.2s ease;
    }
    .gs-tab:last-child {
        border-right: 0;
    }
    .gs-tab:hover {
        background: #fafbfc;
    }
    .gs-tab:focus-visible {
        outline: 2px solid #0F2D50;
        outline-offset: -2px;
    }
    .gs-tab.active {
        background: #f6f8fb;
    }
    .gs-tab.active::after {
        background: #EDCE3E;
    }
    .gs-tab-label {
        display: block;
        font-size: 15px;
        font-weight: 600;
        color: #0F2D50;
        margin: 0 0 3px;
        letter-spacing: -0.005em;
    }
    .gs-tab-desc {
        display: block;
        font-size: 12.5px;
        color: #6b7280;
        line-height: 1.4;
        font-weight: 400;
    }

    /* Panel */
    .gs-panel {
        display: none;
        padding: 24px 26px 26px;
        border-top: 1px solid #f0f1f3;
        background: #fafbfc;
    }
    .gs-panel.active {
        display: block;
        animation: gs-fade-in 0.2s ease-out;
    }
    @keyframes gs-fade-in {
        from { opacity: 0; transform: translateY(-4px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .gs-panel-head {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        margin-bottom: 18px;
        gap: 16px;
        flex-wrap: wrap;
    }
    .gs-panel-title {
        font-size: 16px;
        font-weight: 600;
        color: #0F2D50;
        margin: 0;
        letter-spacing: -0.01em;
    }
    .gs-panel-trust {
        font-size: 12.5px;
        color: #6b7280;
    }
    .gs-panel-trust strong {
        color: #0F2D50;
        font-weight: 600;
    }

    /* Buy form grid */
    .gs-form-grid {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 10px;
        align-items: start;
    }
    .gs-form-grid select {
        padding: 8px!important;
        border: 1px solid #e1e4e8;
        border-radius: 8px;
        background: #ffffff;
        font-size: 13px!important;
        font-family: inherit;
        color: #1f2937;
        cursor: pointer;
        transition: border-color 0.15s, box-shadow 0.15s;
        width: 100%;
        height: 40px;
    }
    .gs-form-grid select:hover {
        border-color: #c4c9d0;
    }
    .gs-form-grid select:focus {
        outline: 0;
        border-color: #0F2D50;
        box-shadow: 0 0 0 3px rgba(15, 45, 80, 0.08);
    }
    .gs-form-actions {
        grid-column: 1 / -1;
        display: flex;
        gap: 10px;
        align-items: center;
        margin-top: 6px;
        flex-wrap: wrap;
    }

    /* CTA */
    .gs-cta {
        background: #0F2D50;
        color: #fff;
        border: 0;
        padding: 11px 20px;
        border-radius: 8px;
        font-size: 13.5px;
        font-weight: 500;
        cursor: pointer;
        font-family: inherit;
        transition: background 0.15s, transform 0.05s;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        height: 40px;
    }
    .gs-cta:hover {
        background: #1a3d63;
    }
    .gs-cta:active {
        transform: scale(0.98);
    }
    .gs-cta-count {
        background: #EDCE3E;
        color: #0F2D50;
        padding: 2px 8px;
        border-radius: 5px;
        font-size: 11.5px;
        font-weight: 600;
        margin-left: 4px;
    }
    .gs-reset {
        background: transparent;
        color: #6b7280;
        border: 0;
        padding: 11px 14px;
        font-size: 13.5px;
        cursor: pointer;
        font-family: inherit;
    }
    .gs-reset:hover {
        color: #0F2D50;
    }

    /* Loading spinner */
    .loading-spinner {
        display: none;
        width: 14px;
        height: 14px;
        border: 2px solid rgba(255,255,255,0.4);
        border-top-color: #fff;
        border-radius: 50%;
        animation: gs-spin 0.8s linear infinite;
    }
    .loading-spinner.active {
        display: inline-block;
    }
    @keyframes gs-spin {
        to { transform: rotate(360deg); }
    }

    /* CF7 forms inside panels — light theme, match aesthetic */
    .gs-cf7-wrap .wpcf7-form input[type="text"],
    .gs-cf7-wrap .wpcf7-form input[type="email"],
    .gs-cf7-wrap .wpcf7-form input[type="tel"],
    .gs-cf7-wrap .wpcf7-form input[type="number"],
    .gs-cf7-wrap .wpcf7-form select,
    .gs-cf7-wrap .wpcf7-form textarea {
        padding: 10px 12px;
        border: 1px solid #e1e4e8;
        border-radius: 8px;
        background: #ffffff;
        font-size: 13.5px;
        font-family: inherit;
        color: #1f2937;
        width: 100%;
        transition: border-color 0.15s, box-shadow 0.15s;
    }
    .gs-cf7-wrap .wpcf7-form input:hover,
    .gs-cf7-wrap .wpcf7-form select:hover,
    .gs-cf7-wrap .wpcf7-form textarea:hover {
        border-color: #c4c9d0;
    }
    .gs-cf7-wrap .wpcf7-form input:focus,
    .gs-cf7-wrap .wpcf7-form select:focus,
    .gs-cf7-wrap .wpcf7-form textarea:focus {
        outline: 0;
        border-color: #0F2D50;
        box-shadow: 0 0 0 3px rgba(15, 45, 80, 0.08);
    }
    .gs-cf7-wrap .wpcf7-form textarea {
        min-height: 70px;
        resize: vertical;
    }
    .gs-cf7-wrap .wpcf7-form input[type="submit"],
    .gs-cf7-wrap .wpcf7-form .formbutton {
        background: #0F2D50;
        color: #fff;
        border: 0;
        padding: 11px 22px;
        border-radius: 8px;
        font-size: 13.5px;
        font-weight: 500;
        cursor: pointer;
        font-family: inherit;
        transition: background 0.15s;
        width: auto;
    }
    .gs-cf7-wrap .wpcf7-form input[type="submit"]:hover,
    .gs-cf7-wrap .wpcf7-form .formbutton:hover {
        background: #1a3d63;
    }
    .gs-cf7-wrap .wpcf7-form label {
        font-size: 12.5px;
        color: #6b7280;
    }
    .gs-cf7-wrap .wpcf7-list-item {
        margin-left: 0;
    }

    /* Results section buttons */
    .results-buttons {
        display: flex;
        gap: 12px;
        justify-content: center;
        margin-top: 24px;
        margin-bottom: 60px;
    }
    .results-buttons a {
        padding: 11px 22px;
        border-radius: 8px;
        font-size: 13.5px;
        font-weight: 500;
        text-decoration: none;
        text-align: center;
        display: inline-block;
        transition: all 0.15s;
    }
    .back-to-filters {
        background: #ffffff;
        color: #0F2D50;
        border: 1px solid #0F2D50;
    }
    .back-to-filters:hover {
        background: #f6f8fb;
    }
    .view-inventory {
        background: #0F2D50;
        color: #fff;
        border: 1px solid #0F2D50;
    }
    .view-inventory:hover {
        background: #1a3d63;
    }

    /* ===== Responsive ===== */
    @media (max-width: 900px) {
        .gs-form-grid {
            grid-template-columns: repeat(2, 1fr);
        }
    }
    @media (max-width: 700px) {
        .gs-tabrow {
            grid-template-columns: repeat(2, 1fr);
        }
        .gs-tab {
            border-bottom: 1px solid #f0f1f3;
            padding: 14px 14px 12px;
        }
        .gs-tab:nth-child(2) { border-right: 0; }
        .gs-tab:nth-child(3), .gs-tab:nth-child(4) { border-bottom: 0; }
        .gs-tab-label {
            font-size: 14px;
        }
        .gs-tab-desc {
            font-size: 12px;
        }
        .gs-panel {
            padding: 20px 18px 22px;
        }
        .gs-panel-head {
            flex-direction: column;
            gap: 4px;
            align-items: flex-start;
        }
    }
    @media (max-width: 480px) {
        .gs-form-grid {
            grid-template-columns: 1fr;
        }
        .gs-cta, .gs-reset {
            width: 100%;
            justify-content: center;
        }
        .gs-form-actions {
            flex-direction: column;
        }
    }
    /* Collapse results section to zero height when empty */
#results.results-anchor {
    margin: 0;
    padding: 0;
}

/* Empty children take no space */
#results-count:empty,
#results-grid:empty {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    line-height: 0;
    font-size: 0;
}

/* Hide the results-buttons wrapper entirely until at least one button is visible.
   The buttons themselves use inline display:none until results load,
   so we just need to drop the wrapper's flex spacing while it has nothing to show. */
.results-buttons {
    margin: 0;
}
.results-buttons:not(:has(a[style*="inline"])) {
    display: none;
}

/* Restore proper spacing once results-grid actually has content */
#results-grid:not(:empty) {
    margin-top: 20px;
}
.results-buttons:has(a[style*="inline"]) {
    display: flex;
    margin-top: 24px;
    margin-bottom: 60px;
}

/* Neutralize the empty load-more wrapper that lmp leaves behind */
.lmp_load_more_button:not(:has(a:not([style*="display: none"]))) {
    display: none !important;
}