/* Dedicated, intent-aware customer search results.  These styles are loaded only
   on the customer portal and deliberately keep normal category browsing intact. */
.customer-semantic-search-active .category-grid,
.customer-semantic-search-active .subcategory-panel,
.customer-semantic-search-active .variant-panel,
.customer-semantic-search-active .discovery-shelf,
.customer-semantic-search-active .catalog-products-heading {
  display: none !important;
}

.customer-search-results {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
}

.customer-search-results__intro {
  align-items: start;
  background:
    radial-gradient(circle at 100% 0, #dce8ff 0, transparent 42%),
    linear-gradient(135deg, #f8fbff, #eef4ff);
  border: 1px solid #d2e0fb;
  border-radius: 18px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 15px;
}

.customer-search-results__intro-copy { min-width: 0; }
.customer-search-results__eyebrow {
  color: #3569c8;
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.customer-search-results__intro h3 { color: #142a55; font-size: 18px; line-height: 1.24; margin: 0; }
.customer-search-results__intro p { color: #52627d; font-size: 13px; line-height: 1.42; margin: 5px 0 0; }
.customer-search-results__clear {
  background: #fff;
  border: 1px solid #bcd0f5;
  border-radius: 11px;
  color: #2458bd;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  min-height: 38px;
  padding: 8px 11px;
}
.customer-search-results__clear:hover { background: #e8f0ff; border-color: #759cea; }

.customer-search-results__list { display: grid; gap: 12px; }
.customer-search-empty {
  background: #fff;
  border: 1px dashed #cbd8ec;
  border-radius: 18px;
  color: #52627d;
  padding: 26px 18px;
  text-align: center;
}
.customer-search-empty span { display: block; font-size: 30px; margin-bottom: 5px; }
.customer-search-empty h3 { color: #172b54; font-size: 17px; margin: 0; }
.customer-search-empty p { font-size: 13px; margin: 7px auto 13px; max-width: 30rem; }

.customer-search-restaurant,
.customer-search-store {
  background: #fff;
  border: 1px solid #dce5f4;
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(32, 61, 111, .06);
  overflow: hidden;
}
.customer-search-restaurant__main,
.customer-search-store__head {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  min-width: 0;
  padding: 12px;
}
.customer-search-restaurant__main { cursor: pointer; text-align: left; width: 100%; }
.customer-search-restaurant__main:hover { background: #f6f9ff; }
.customer-search-restaurant__main:focus-visible,
.customer-search-item__add:focus-visible,
.customer-search-results__clear:focus-visible { outline: 3px solid #9bbcff; outline-offset: 2px; }
.customer-search-restaurant__image,
.customer-search-store__image {
  background: #edf3ff;
  border-radius: 14px;
  height: 74px;
  object-fit: cover;
  width: 74px;
}
.customer-search-restaurant__copy,
.customer-search-store__copy { min-width: 0; }
.customer-search-restaurant__copy b,
.customer-search-store__copy b { color: #122a57; display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customer-search-restaurant__copy small,
.customer-search-store__copy small { color: #61718c; display: block; font-size: 11px; line-height: 1.35; margin-top: 3px; }
.customer-search-restaurant__open {
  background: linear-gradient(135deg, #286bea, #5434dc);
  border: 0;
  border-radius: 11px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 10px 12px;
  white-space: nowrap;
}
.customer-search-match {
  align-items: center;
  background: #f5f8ff;
  border-top: 1px solid #e4ebf6;
  color: #314665;
  display: flex;
  gap: 9px;
  padding: 10px 12px;
}
.customer-search-match__image {
  border-radius: 9px;
  height: 38px;
  object-fit: cover;
  width: 38px;
}
.customer-search-match span { display: grid; gap: 1px; min-width: 0; }
.customer-search-match small { color: #6b7c99; font-size: 10px; }
.customer-search-match b { color: #193566; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customer-search-match strong { color: #245dd0; font-size: 12px; margin-left: auto; white-space: nowrap; }

.customer-search-store__head { grid-template-columns: 52px minmax(0, 1fr); padding-bottom: 9px; }
.customer-search-store__image { border-radius: 11px; height: 52px; width: 52px; }
.customer-search-store__products { border-top: 1px solid #e5ebf4; display: grid; }
.customer-search-item {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  min-width: 0;
  padding: 10px 12px;
}
.customer-search-item + .customer-search-item { border-top: 1px solid #edf1f7; }
.customer-search-item__image { border-radius: 10px; height: 48px; object-fit: cover; width: 48px; }
.customer-search-item__copy { display: grid; gap: 2px; min-width: 0; }
.customer-search-item__copy b { color: #16305e; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customer-search-item__copy small { color: #6c7d96; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customer-search-item__price { color: #174dc0; font-size: 13px; font-weight: 850; }
.customer-search-item__add {
  background: #e9f1ff;
  border: 1px solid #b8cef9;
  border-radius: 10px;
  color: #1e57c8;
  font-size: 20px;
  font-weight: 800;
  height: 38px;
  line-height: 1;
  width: 38px;
}
.customer-search-item__add:hover { background: #2869e9; border-color: #2869e9; color: #fff; }

.restaurant-menu-search-context {
  align-items: center;
  background: linear-gradient(135deg, #edf4ff, #f7f2ff);
  border: 1px solid #ceddf8;
  border-radius: 14px;
  display: flex;
  gap: 9px;
  justify-content: space-between;
  margin: 12px 0;
  padding: 10px 12px;
}
.restaurant-menu-search-context span { color: #2b4f91; font-size: 12px; font-weight: 700; }
.restaurant-menu-search-context b { color: #173c81; }
.restaurant-menu-search-context button { background: #fff; border: 1px solid #aac4f0; border-radius: 9px; color: #2656b2; font-size: 11px; font-weight: 800; padding: 8px 9px; }
.restaurant-menu-item.is-search-match { box-shadow: 0 0 0 2px #4d82ed, 0 11px 26px rgba(50, 105, 228, .18); position: relative; }
.restaurant-menu-item .restaurant-menu-search-badge { background: #2869e9; border-radius: 999px; color: #fff; display: inline-block; font-size: 10px; font-weight: 800; margin: 2px 0 6px; padding: 4px 8px; }

html[data-theme="dark"] .customer-search-results__intro,
html[data-theme="dark"] .customer-search-restaurant,
html[data-theme="dark"] .customer-search-store,
html[data-theme="dark"] .customer-search-empty { background: #17243a; border-color: #304968; box-shadow: none; }
html[data-theme="dark"] .customer-search-results__intro h3,
html[data-theme="dark"] .customer-search-restaurant__copy b,
html[data-theme="dark"] .customer-search-store__copy b,
html[data-theme="dark"] .customer-search-match b,
html[data-theme="dark"] .customer-search-item__copy b { color: #e7efff; }
html[data-theme="dark"] .customer-search-results__intro p,
html[data-theme="dark"] .customer-search-restaurant__copy small,
html[data-theme="dark"] .customer-search-store__copy small,
html[data-theme="dark"] .customer-search-item__copy small { color: #b5c5dd; }
html[data-theme="dark"] .customer-search-match { background: #1b2d47; border-color: #324c70; }
html[data-theme="dark"] .customer-search-item + .customer-search-item,
html[data-theme="dark"] .customer-search-store__products { border-color: #2b405f; }
html[data-theme="dark"] .restaurant-menu-search-context { background: #172b48; border-color: #385787; }
html[data-theme="dark"] .restaurant-menu-search-context span,
html[data-theme="dark"] .restaurant-menu-search-context b { color: #d6e4ff; }

@media (max-width: 700px) {
  .customer-search-results { gap: 10px; }
  .customer-search-results__intro { border-radius: 15px; padding: 12px; }
  .customer-search-results__intro h3 { font-size: 15px; }
  .customer-search-results__intro p { font-size: 11px; }
  .customer-search-results__clear { font-size: 10px; min-height: 34px; padding: 6px 8px; }
  .customer-search-restaurant,
  .customer-search-store { border-radius: 15px; }
  .customer-search-restaurant__main { gap: 9px; grid-template-columns: 54px minmax(0, 1fr) auto; padding: 10px; }
  .customer-search-restaurant__image { border-radius: 11px; height: 54px; width: 54px; }
  .customer-search-restaurant__copy b { font-size: 13px; }
  .customer-search-restaurant__copy small { font-size: 10px; }
  .customer-search-restaurant__open { font-size: 10px; padding: 8px; }
  .customer-search-match { padding: 8px 10px; }
  .customer-search-match__image { height: 34px; width: 34px; }
  .customer-search-match b { font-size: 12px; }
  .customer-search-store__head { gap: 9px; padding: 10px; }
  .customer-search-item { gap: 8px; grid-template-columns: 42px minmax(0, 1fr) auto; padding: 9px 10px; }
  .customer-search-item__image { height: 42px; width: 42px; }
  .customer-search-item__copy b { font-size: 12px; }
  .customer-search-item__price { font-size: 11px; }
  .restaurant-menu-search-context { align-items: flex-start; flex-direction: column; gap: 7px; }
  .restaurant-menu-search-context button { align-self: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  .restaurant-menu-item.is-search-match { transition: none !important; }
}
