/* MK Search Categories - block on the search page.
   Same visual language as the suggestions: white card, semibold near black
   label, brand red accent, muted parent category. */
.mk-searchcat {
  margin: 0 0 1.75rem;
}

.mk-searchcat__title {
  margin: 0 0 .85rem;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #8a8a8a;
}

.mk-searchcat__title::after {
  content: "";
  display: block;
  width: 30px;
  height: 2px;
  margin-top: .45rem;
  background-color: #ec4249;
}

.mk-searchcat__list {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mk-searchcat__item {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mk-searchcat__link {
  display: flex;
  align-items: center;
  gap: .65rem;
  height: 100%;
  padding: .7rem 1rem;
  border: 1px solid #e8e0e0;
  border-radius: 6px;
  background-color: #fff;
  color: #2b2b2b;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, color .18s ease;
}

.mk-searchcat__link:hover,
.mk-searchcat__link:focus {
  border-color: #ec4249;
  color: #ec4249;
  box-shadow: 0 4px 12px rgba(236, 66, 73, .16);
  transform: translateY(-1px);
  text-decoration: none;
}

.mk-searchcat__icon {
  flex: 0 0 auto;
  font-size: 16px;
  color: #ec4249;
}

.mk-searchcat__image {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 4px;
}

.mk-searchcat__text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.mk-searchcat__name {
  font-size: 14px;
  font-weight: 600;
}

.mk-searchcat__path {
  font-size: 11px;
  color: #b0aaaa;
}

/* MK Search Categories - entries inside the jQuery UI autocomplete menu.
   The categories read as a distinct block above the products: tinted row,
   darker and heavier label, brand coloured folder icon. */
.ui-autocomplete .mk-searchcat-suggestions__title {
  padding: .6rem .8rem .35rem;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #a8a8a8;
  list-style: none;
}

.ui-autocomplete .mk-searchcat-suggestions__title--category {
  background-color: #fbf7f7;
  color: #ec4249;
}

.ui-autocomplete .mk-searchcat-suggestions__title--product {
  border-top: 1px solid #ebebeb;
}

.ui-autocomplete li.mk-searchcat-suggestions__item {
  background-color: #fbf7f7;
}

.ui-autocomplete.ui-menu .ui-menu-item a.mk-searchcat-suggestions__link {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding-left: .8rem;
  padding-right: .8rem;
  border-bottom-color: #f3e9e9 !important;
  color: #2b2b2b;
}

.ui-autocomplete.ui-menu .ui-menu-item a.mk-searchcat-suggestions__link:hover,
.ui-autocomplete.ui-menu .ui-menu-item a.mk-searchcat-suggestions__link.ui-state-focus,
.ui-autocomplete.ui-menu .ui-menu-item a.mk-searchcat-suggestions__link.ui-state-active {
  background-color: #fff;
  color: #ec4249;
}

.mk-searchcat-suggestions__image {
  width: 34px;
  height: 34px;
  object-fit: cover;
  flex: 0 0 auto;
}

.mk-searchcat-suggestions__icon {
  flex: 0 0 auto;
  width: 18px;
  font-size: 15px;
  text-align: center;
  color: #ec4249;
}

.mk-searchcat-suggestions__name {
  flex: 0 1 auto;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
}

.mk-searchcat-suggestions__path {
  margin-left: auto;
  padding-left: .75rem;
  font-size: 11px;
  font-weight: 400;
  color: #b0aaaa;
}

/* MK Search Categories - mobile search field and dropdown
   The theme opens the search field as an absolutely positioned panel with a
   barely visible 1px border, and the suggestion list can grow past the screen.
   These rules only touch the mobile breakpoint and disappear with the module. */
@media (max-width: 767px) {
  .form_ps_search {
    border: 2px solid #d0d0d0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
  }

  .search-widget .form_ps_search form input[type="text"] {
    border: 0;
    padding-left: 12px;
  }

  /* The list is anchored to the field, which sits 2px inside the panel; pin it
     to the viewport instead so it cannot push the page sideways. */
  ul.ui-autocomplete {
    left: 0 !important;
    width: 100% !important;
    max-width: 100vw;
    max-height: 60vh;
    overflow-x: hidden;
    overflow-y: auto;
  }
}
