/* Storefront search UI. Kept small; inherits the theme's fonts, colors and product grid. */
.msx-chip { display: inline-block; background: #eef2ff; color: #3730a3; border: 0; border-radius: 999px; padding: 2px 10px; font-size: 0.85em; line-height: 1.6; cursor: default; }
.msx-chip small { opacity: .65; margin-left: 4px; }
button.msx-chip, .msx-chip.is-removable { cursor: pointer; }
.msx-link { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font-size: inherit; }
.msx-stars { display: inline-block; width: 5.4em; height: 1em; vertical-align: -2px; background: linear-gradient(90deg, #f5a623 var(--r), #d6d6d6 var(--r));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3 7 7 .6-5.3 4.7 1.6 7.2L12 17.8 5.7 21.5l1.6-7.2L2 9.6 9 9z'/%3E%3C/svg%3E") repeat-x 0 0 / 1.08em 1em;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3 7 7 .6-5.3 4.7 1.6 7.2L12 17.8 5.7 21.5l1.6-7.2L2 9.6 9 9z'/%3E%3C/svg%3E") repeat-x 0 0 / 1.08em 1em; }
mark { background: #fff3a3; color: inherit; padding: 0; }

/* Autocomplete */
.msx-ac { position: absolute; z-index: 9999; top: 100%; right: 0; width: max(100%, 460px); max-height: 75vh; overflow: auto; background: #fff; color: #333;
  border: 1px solid #ddd; border-radius: 6px; box-shadow: 0 12px 32px rgba(0,0,0,.15); font-size: 14px; text-align: left; }
.msx-ac a { display: flex; align-items: center; gap: 10px; padding: 6px 12px; color: inherit; text-decoration: none; }
.msx-ac a.is-active, .msx-ac a:hover { background: #f3f4f6; }
.msx-ac-tabs { display: flex; border-bottom: 1px solid #eee; position: sticky; top: 0; background: #fff; z-index: 1; }
.msx-ac-tabs button { flex: 1; background: none; border: 0; border-bottom: 2px solid transparent; padding: 12px 8px; font-weight: 600; color: #555; cursor: pointer; font-size: 14px; }
.msx-ac-tabs button span { font-weight: 400; color: #999; margin-left: 4px; font-size: 12px; }
.msx-ac-tabs button.is-active { color: #000; border-bottom-color: #000; }
.msx-ac-foot { padding: 6px 12px; font-size: 11px; color: #16a34a; text-align: right; border-top: 1px solid #eee; }
.msx-ac-post img { width: 44px; height: 44px; object-fit: cover; flex: none; border-radius: 4px; }
.msx-ac-section { padding: 8px 12px 2px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #888; }
.msx-ac-intent { padding: 8px 12px; background: #f8fafc; border-bottom: 1px solid #eee; }
.msx-ac-cat span { margin-left: auto; color: #999; font-size: 12px; }
.msx-ac-product img, .msx-noimg { width: 44px; height: 44px; object-fit: contain; flex: none; background: #fafafa; }
.msx-ac-name { flex: 1; line-height: 1.3; }
.msx-ac-name small { display: block; color: #888; }
.msx-ac-price { white-space: nowrap; font-weight: 600; }
.msx-ac-price del { opacity: .5; font-weight: 400; }
.msx-ac-empty { padding: 6px 12px; color: #888; }
.msx-ac-all { border-top: 1px solid #eee; display: block !important; }
.msx-ms { font-weight: 400; font-size: 12px; color: #16a34a; }

/* Results page */
.msx-content-area { width: 100% !important; float: none !important; margin-right: 0 !important; }
.msx-results.is-loading { opacity: .6; transition: opacity .15s; }
.msx-meta { color: #666; margin: 0 0 .5em; font-size: .9em; }
.msx-intent { margin: .5em 0 1em; }
.msx-layout { display: grid; grid-template-columns: 240px 1fr; gap: 2em; }
@media (max-width: 768px) { .msx-layout { grid-template-columns: 1fr; } }
.msx-facets { font-size: .9em; }
.msx-facets h4 { font-size: 1em; margin: 1.2em 0 .4em; }
.msx-facets ul { list-style: none; margin: 0; }
.msx-facets li { margin: 2px 0; }
.msx-facets label { cursor: pointer; display: flex; gap: 6px; align-items: baseline; }
.msx-count { margin-left: auto; color: #999; font-size: .85em; }
.msx-more { background: none; border: 0; padding: 4px 0; color: #2563eb; cursor: pointer; font-size: .9em; }
.msx-price { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.msx-price-apply { flex-basis: 100%; margin-top: 4px; }
.msx-filters-toggle { display: none; }
@media (max-width: 768px) {
  /* On phones filters fold away behind a button so the products come first. */
  .msx-filters-toggle { display: block; width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 6px; background: none; font: inherit; font-weight: 600; cursor: pointer; }
  .msx-facets { display: none; }
  .msx-facets.is-open { display: block; }
}
.msx-price input { width: 0; flex: 1; min-width: 0; padding: 4px 6px; }
.msx-price-apply { flex: none; padding: 6px 12px; border: 1px solid currentColor; border-radius: 4px; background: transparent; color: inherit; font: inherit; font-size: .9em; cursor: pointer; }
.msx-search input { width: 100%; }
.msx-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1em; margin-bottom: 1em; }
.msx-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.msx-grid.products { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1.5em; margin: 0; }
.msx-grid.products::before, .msx-grid.products::after { display: none !important; } /* theme clearfix would take grid cells */
.msx-grid.products li.product { width: auto !important; margin: 0 !important; float: none !important; }
.msx-grid li.product img { aspect-ratio: 1; object-fit: contain; width: 100%; }
.msx-grid .woocommerce-loop-product__title { font-size: .95em !important; line-height: 1.35; }

/* Comparison */
.msx-compare-form { display: flex; gap: 8px; }
.msx-compare-form input { flex: 1; }
.msx-demo { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 1em 0; }
.msx-compare-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5em; }
@media (max-width: 768px) { .msx-compare-cols { grid-template-columns: 1fr; } }
.msx-col { border: 1px solid #e5e7eb; border-radius: 8px; padding: 1em; }
.msx-col h3 { margin-top: 0; }
.msx-col[data-col=meili] { border-color: #a5b4fc; }
.msx-stat { background: #f8fafc; padding: 6px 10px; border-radius: 6px; }
.msx-compare-list { margin: 0; list-style: none; }
.msx-compare .msx-compare-list a, .msx-compare .msx-compare-list a:hover { display: flex; gap: 10px; align-items: center; padding: 4px 0; text-decoration: none; color: inherit; font-size: .9em; }
.msx-compare-list img, .msx-compare-list .msx-noimg { width: 40px; height: 40px; object-fit: contain; flex: none; }
.msx-compare-list span { flex: 1; }
.msx-none { color: #999; font-size: 1.1em; }
.msx-ac a, .msx-ac a:hover, .msx-compare .msx-compare-list a span { text-decoration: none !important; }
