/* TASK-069 live search overlay. MOBILE-FIRST: base = phones, min-width queries scale up. Accent #ff3f6c. */
html.ls-open, html.ls-open body { overflow: hidden; }

/* no browser-default blue focus on the header box / overlay input */
html #txt-search:focus, html #txt-search:active, html #ls-input:focus, html #ls-input:active,
html .search .input-field .input-text:focus { outline: 0 !important; box-shadow: none !important; border-bottom: 0 !important; }

/* legacy header autocomplete is hidden while live search drives #txt-search */
html.ls-hide-suggest #search-suggestion, html.ls-hide-suggest #search-suggestions { display: none !important; }

/* ---------- overlay shell ---------- */
.ls-overlay { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 100000; background: #fff; overflow-y: auto; -webkit-overflow-scrolling: touch;
    opacity: 0; transform: translateY(-8px) scale(.99); transform-origin: top center;
    transition: opacity .18s ease-in, transform .18s ease-in; }   /* closing: reverse, ease-in */
.ls-overlay.ls-in { opacity: 1; transform: none; transition: opacity .22s ease-out, transform .22s ease-out; }   /* opening: ease-out */

.ls-strip { position: -webkit-sticky; position: sticky; top: 0; z-index: 2; background: #fff; border-bottom: 1px solid #eee; box-shadow: 0 2px 6px rgba(0,0,0,.05); }
.ls-strip-in { display: flex; align-items: center; padding: 8px; }
.ls-iconbtn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none; color: #333; font-size: 22px; border-radius: 50%; }
.ls-iconbtn i { font-size: 24px; }
.ls-iconbtn:hover { color: #ff3f6c; background: #fff3f6; }
#ls-close { display: none; }
.ls-logo { display: none; }

.ls-field { position: relative; display: flex; align-items: center; flex: 1; min-width: 0; margin: 0 6px; border: 1px solid #ddd; border-radius: 4px; background: #fafafa; }
.ls-field > .zmdi-search { padding: 0 6px 0 12px; font-size: 20px; color: #888; }
.ls-field input { flex: 1; min-width: 0; height: 40px; padding: 0 10px; border: 0; background: transparent; font-size: 16px; color: #222; margin: 0; }
.ls-field:focus-within { border-color: #ff3f6c; background: #fff; }
.ls-clear { padding: 0 10px; font-size: 13px; color: #888; }
.ls-clear:hover { color: #ff3f6c; }
.ls-go { flex: none; padding: 0 12px; height: 40px; line-height: 40px; background: #ff3f6c; color: #fff; border-radius: 4px; font-size: 13px; font-weight: 600; text-transform: uppercase; }

/* ---------- body: full viewport width ---------- */
.ls-body { width: 100%; padding: 8px 8px 32px; }
.ls-title { margin: 6px 0 2px; font-size: 18px; font-weight: 600; color: #222; }
.ls-count { font-size: 13px; font-weight: 400; color: #777; }
.ls-status { min-height: 20px; padding: 4px 0; font-size: 13px; color: #555; }
.ls-status b { color: #222; }
.ls-retry { display: inline-block; margin-top: 8px; padding: 8px 18px; background: #ff3f6c; color: #fff !important; border-radius: 4px; font-weight: 600; }
.ls-suggest { color: #ff3f6c; font-weight: 600; }

/* ---------- filter / sort bar (listing-page look: bordered bar, outline pills) ---------- */
.ls-tools { display: flex; flex-direction: column; margin: 6px 0 8px; padding: 6px 0 2px; border-top: 1px solid #ccc; border-bottom: 1px solid #ccc; }

/* chips WRAP (never scroll): one row collapsed, "+N more" expands every row */
.ls-facetwrap { display: flex; align-items: flex-start; min-width: 0; }
.ls-facets { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; max-height: 32px; overflow: hidden; }
.ls-facets.ls-exp { max-height: none; overflow: visible; }
.ls-chip { flex: none; display: inline-block; box-sizing: content-box; height: 20px; line-height: 20px; margin: 0 4px 4px 0; padding: 3px 12px; border: 1px solid #ff3f6c; border-radius: 50px; font-size: 12px; font-weight: 500; color: #000; background: #fff; white-space: nowrap; }
.ls-chip:hover { background: #fff3f6; }
.ls-chip.active { background: #ff3f6c; color: #fff; }
.ls-more { flex: none; margin: 0 0 4px 4px; padding: 3px 4px; line-height: 20px; font-size: 12px; font-weight: 600; color: #ff3f6c; white-space: nowrap; }

/* sort dropdown: same look as the listing's .select-box + materialize .dropdown-content (white panel, soft shadow, 13px rows, #eee hover) */
.ls-dd { position: relative; display: inline-block; align-self: flex-start; margin: 2px 0 4px; }
.ls-dd-btn { display: inline-flex; align-items: center; height: 30px; padding: 0 10px; border: 1px solid #ccc; border-radius: 2px; font-size: 13px; color: #444; background: #fff; }
.ls-dd-k { margin-right: 4px; color: #777; }
.ls-dd-btn b { font-weight: 600; color: #000; }
.ls-caret { margin-left: 8px; border: 4px solid transparent; border-top-color: #444; border-bottom-width: 0; }
.ls-dd.open .ls-dd-btn { border-color: #ff3f6c; }
.ls-dd-menu { display: none; position: absolute; top: 100%; left: 0; z-index: 5; min-width: 100%; margin: 2px 0 0; padding: 4px 0; list-style: none; background: #fff; box-shadow: 0 2px 5px 0 rgba(0,0,0,.16), 0 2px 10px 0 rgba(0,0,0,.12); }
.ls-dd.open .ls-dd-menu { display: block; }
.ls-dd-menu li { margin: 0; padding: 0; white-space: nowrap; }
.ls-opt { display: block; padding: 5px 15px; font-size: 13px; line-height: 1.5; color: #444; }
.ls-opt:hover { background: #eee; }
.ls-opt.active { color: #ff3f6c; font-weight: 600; }

/* ---------- product grid: 2 cols on phones, scaling up. Overrides the fixed-width desktop card (.product-box) and mobile card (.list-box) ---------- */
.ls-results { display: flex; flex-wrap: wrap; align-items: flex-start; min-height: 40px; }
.ls-results .product-box { width: calc(50% - 6px); margin: 3px; }
.ls-results .product-box .p-image { width: 100%; height: auto; aspect-ratio: 339 / 490; object-fit: cover; }
.ls-results .list-box { width: 50%; }

.ls-loader { padding: 16px 0; text-align: center; font-size: 14px; color: #777; }
.ls-spin { display: inline-block; width: 16px; height: 16px; margin-right: 6px; vertical-align: middle; border: 2px solid #eee; border-top-color: #ff3f6c; border-radius: 50%; animation: ls-rot .7s linear infinite; }
@keyframes ls-rot { to { transform: rotate(360deg); } }
.ls-foot { padding: 16px 0 0; text-align: center; }
.ls-foot a { color: #ff3f6c; font-weight: 600; border-bottom: 1px solid #ff3f6c; }

/* ---------- >= 576px ---------- */
@media (min-width: 576px) {
    .ls-body { padding: 10px 12px 40px; }
    .ls-results .product-box { width: calc(33.333% - 8px); margin: 4px; }
    .ls-results .list-box { width: 33.333%; }
    .ls-go { padding: 0 18px; font-size: 14px; }
}

/* ---------- >= 768px (tablet): logo + close icon, filters and sort on one row ---------- */
@media (min-width: 768px) {
    .ls-strip-in { padding: 10px 16px; }
    .ls-logo { display: flex; align-items: center; flex: none; margin: 0 12px 0 4px; }
    .ls-logo img { height: 34px; width: auto; }
    #ls-close { display: flex; }
    .ls-field input { height: 42px; }
    .ls-go { height: 42px; line-height: 42px; }
    .ls-body { padding: 12px 16px 40px; }
    .ls-title { font-size: 22px; }
    .ls-tools { flex-direction: row; align-items: flex-start; justify-content: space-between; }
    .ls-facetwrap { flex: 1 1 auto; margin-right: 12px; }
    .ls-dd { flex: none; margin-top: 0; }
    .ls-dd-menu { left: auto; right: 0; }
    .ls-status { font-size: 14px; }
    .ls-results .product-box { width: calc(25% - 8px); }
    .ls-results .list-box { width: 25%; }
}

/* ---------- >= 1100px ---------- */
@media (min-width: 1100px) {
    .ls-results .product-box { width: calc(20% - 8px); }
    .ls-results .list-box { width: 20%; }
}

/* ---------- >= 1400px: 6 columns ---------- */
@media (min-width: 1400px) {
    .ls-body { padding-left: 20px; padding-right: 20px; }
    .ls-results .product-box { width: calc(16.666% - 8px); }
    .ls-results .list-box { width: 16.666%; }
}
