/* Flatlines autocomplete is appended to #queryBox. Constrain only narrow screens.
   jQuery UI sets an inline width from the longest label: override that width,
   not the page overflow (which would hide the price instead of fixing layout). */
@media (max-width: 767px) {
    /* Active Amazing theme: override its width:calc(100% + 64px).
       Keep the price non-shrinking and allow the title flex item to shrink. */
    form.rs-search-line .head-search__dropdown.rs-autocomplete-result {
        box-sizing: border-box;
        width: 100% !important;
        min-width: 0;
        max-width: calc(100vw - 24px);
        left: 0;
    }
    form.rs-search-line .head-search__dropdown .dropdown-item > .col {
        min-width: 0;
        flex: 1 1 0%;
        overflow-wrap: anywhere;
    }
    form.rs-search-line .head-search__dropdown .dropdown-item > .text-nowrap {
        flex: 0 0 auto;
        margin-left: 12px !important;
    }
    #queryBox .search-items {
        box-sizing: border-box;
        width: 100% !important;
        min-width: 0 !important;
        max-width: calc(100vw - 24px) !important;
        left: 0 !important;
        right: auto !important;
    }
    #queryBox .search-items li a {
        box-sizing: border-box;
        min-width: 0;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    #queryBox .search-items li .title,
    #queryBox .search-items li .barcode,
    #queryBox .search-items li .price {
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
    }
}
/* Hide stale native rendering synchronously, before the next browser paint. */
.rs-search-line[data-atg-stale-suggestions="1"] .rs-autocomplete-result {
    display: none !important;
}

.atg-search-tools{margin:12px 0;max-width:100%;color:inherit}
.atg-search-refine{border:1px solid #ddd;border-radius:6px;padding:10px 12px;margin:0 0 12px}
.atg-search-refine summary{cursor:pointer;font-weight:600}
.atg-refine-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:12px 0}
.atg-refine-fields label{min-width:0;display:flex;flex-direction:column;gap:4px;font-size:14px}
.atg-refine-fields select{max-width:100%;min-width:0;width:100%;padding:8px;border:1px solid #bbb;border-radius:4px;background:#fff;color:#222}
.atg-refine-form button{padding:8px 12px;border:1px solid #1376ce;border-radius:4px;background:#247fe7;color:#fff;cursor:pointer}
.atg-refine-help{font-size:12px;line-height:1.4;margin:10px 0 0;color:#666}
.atg-exact-empty{font-size:22px;line-height:1.3;margin:16px 0}
.atg-nearby{border-left:3px solid #e3b23c;padding:8px 12px;margin:10px 0 20px;background:#fffdf4}
.atg-nearby h3{font-size:16px;margin:0 0 8px}.atg-nearby ul{list-style:none;padding:0;margin:0}
.atg-nearby li{display:grid;gap:3px;padding:8px 0;border-top:1px solid #e6e1d2;overflow-wrap:anywhere}
.atg-nearby li strong{font-size:13px;color:#775300}.atg-nearby li span{font-size:14px}
@media(max-width:767px){.atg-refine-fields{grid-template-columns:1fr 1fr}.atg-search-refine{padding:8px 10px}.atg-search-refine summary{font-size:14px}.atg-exact-empty{font-size:19px}.atg-nearby{padding:8px}.atg-nearby a{font-size:14px}}
@media(max-width:359px){.atg-refine-fields{grid-template-columns:1fr}}
