.header:has(.ionity-product-search-slot) .logo {
  width: auto;
  max-width: 140px;
  flex: 0 0 auto;
}

.ionity-product-search-slot {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
  min-height: 48px;
  position: relative;
  z-index: 2;
}

.ionity-product-search {
  width: 100%;
  max-width: 400px;
  position: relative;
}

.ionity-product-search.is-open.is-portaled {
  z-index: 1001;
}

.ionity-product-search__backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(13, 13, 13, 0.35);
  cursor: default;
  animation: ionity-product-search-backdrop-in 0.22s ease-out both;
}

.ionity-product-search__backdrop[hidden] {
  display: none !important;
}

.ionity-product-search__card {
  position: relative;
  z-index: 1;
  width: 100%;
}

.ionity-product-search.is-open .ionity-product-search__card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(13, 13, 13, 0.12);
  padding: 16px 0 10px;
  max-height: calc(100dvh - 24px);
  overflow-x: hidden;
  overflow-y: auto;
  transform-origin: top center;
  animation: ionity-product-search-card-in 0.26s cubic-bezier(0.22, 1, 0.36, 1)
    both;

  border-top-right-radius: 40px;
  border-top-left-radius: 40px;
}

.ionity-product-search__form {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

.ionity-product-search.is-open .ionity-product-search__form {
  padding: 0 16px;
  box-sizing: border-box;
  align-items: stretch;
}

.ionity-product-search__field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  background: #fff;
  border: 1px solid #e6e6ee;
  border-radius: 100px;
  padding: 8px 16px 8px 24px;
  min-height: 48px;
}

/* Covers the slot until JS is ready; stays in the slot when the widget portals. */
.ionity-product-search__gate {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: transparent;
}

.ionity-product-search-slot.is-ready .ionity-product-search__gate {
  display: none;
}

.ionity-product-search.is-open .ionity-product-search__field {
  border-color: #0d0d0d;
  transition: flex 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.ionity-product-search__icon {
  display: flex;
  color: #8a8a96;
  flex: 0 0 auto;
}

.ionity-product-search__input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  color: #2f2f2f;
  outline: none;
  box-shadow: none;
}

.ionity-product-search__input::placeholder {
  color: #969696;
  opacity: 1;
}

.ionity-product-search__input::-webkit-search-decoration,
.ionity-product-search__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.ionity-product-search__clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #6b6b76;
  cursor: pointer;
  flex: 0 0 auto;
}

.ionity-product-search__clear:hover {
  background: #f4f4f9;
  color: #0d0d0d;
}

.ionity-product-search__submit {
  flex: 0 0 auto;
  border: 0;
  border-radius: 100px;
  background: #2c80ff;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  padding: 14px 22px;
  cursor: pointer;
  white-space: nowrap;
}

.ionity-product-search.is-open .ionity-product-search__submit {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  max-width: 0;
  padding-left: 0;
  padding-right: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition:
    max-width 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    padding 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.ionity-product-search.is-open .ionity-product-search__submit.is-visible {
  max-width: 160px;
  padding: 14px 22px;
  opacity: 1;
  pointer-events: auto;
}

.ionity-product-search__submit-icon {
  display: none;
}

.ionity-product-search__mobile-head {
  display: none;
}

.ionity-product-search__trigger {
  display: none;
}

.ionity-product-search__submit[hidden],
.ionity-product-search:not(.is-open) .ionity-product-search__submit {
  display: none !important;
  max-width: none;
  opacity: 1;
  padding: 14px 22px;
  pointer-events: auto;
}

.ionity-product-search__clear[hidden] {
  display: none !important;
}

.ionity-product-search__submit-text {
  display: inline;
}

.ionity-product-search__submit:hover {
  background: #1f6ae0;
}

.ionity-product-search.is-open .ionity-product-search__submit.is-appearing {
  animation: ionity-product-search-submit-in 0.22s
    cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ionity-product-search__panel {
  padding: 20px 0 0;
}

.ionity-product-search.is-open .ionity-product-search__panel {
  padding: 20px 0 0;
}

.ionity-product-search__section-title {
  margin: 0 24px 8px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: #969696;
}

.ionity-product-search__list,
.ionity-product-search__products {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ionity-product-search__query {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 14px 24px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  color: #000;
  cursor: pointer;
  text-decoration: none;
}

a.ionity-product-search__query:hover {
  color: #0d0d0d;
}

.ionity-product-search__query:hover,
.ionity-product-search__product:hover,
.ionity-product-search__history-row:hover {
  background: #f4f4f9;
}

.ionity-product-search__history-row:hover .ionity-product-search__query {
  background: transparent;
}

.ionity-product-search__history-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-right: 16px;
}

.ionity-product-search__history-row .ionity-product-search__query {
  flex: 1 1 auto;
}

.ionity-product-search__history-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #8a8a96;
  cursor: pointer;
  flex: 0 0 auto;
}

.ionity-product-search__history-remove:hover {
  color: #0d0d0d;
}

.ionity-product-search__product {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 24px;
  border-radius: 0;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.ionity-product-search__product-image {
  flex: 0 0 124px;
  width: 124px;
  height: 92px;
  border-radius: 12px;
  overflow: hidden;
  background: #f4f4f9;
}

.ionity-product-search__product-image img {
  display: block;
  width: 124px;
  height: 92px;
  max-width: none;
  object-fit: cover;
  object-position: center;
}

.ionity-product-search__product-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
}

.ionity-product-search__product-category {
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  color: #0d0d0d;
}

.ionity-product-search__product-title-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ionity-product-search__product-title {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  color: #000;
}

.ionity-product-search__product--text .ionity-product-search__product-title {
  font-weight: 600;
}

.ionity-product-search__product-badges {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
}

.ionity-product-search__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-sizing: border-box;
  border-radius: 20px;
  white-space: nowrap;
  height: 24px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 400;
  line-height: 24px;
  color: #000;
  background: #fff;
  border: 1px solid #e7e7f3;
}

.ionity-product-search__badge--level {
  padding: 0 10px;
  background: #7ad446;
  border: 0;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}

.ionity-product-search__badge--power {
  padding: 0 10px 0 6px;
  background: #fff;
  border: 1px solid #e7e7f3;
  font-size: 12px;
  font-weight: 400;
}

.ionity-product-search__product-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.35;
  color: #2f2f2f;
}

.ionity-product-search__show-all {
  display: block;
  margin: 12px 24px 12px;
  padding: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  color: #2c80ff;
  text-decoration: underline;
}

.ionity-product-search__show-all:hover {
  opacity: 0.7;
}

@media (max-width: 1023.98px) {
  .ionity-product-search__show-all {
    font-size: 14px;
  }
}
.ionity-product-search__no-results {
  display: none;
}

.ionity-product-search__empty-state {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ionity-product-search__empty-state[hidden] {
  display: none;
}
/* .ionity-product-search__empty-state > * {
  margin-top: 0;
} */

@media (min-width: 1024px) {
  .ionity-product-search.is-open.is-live-empty .ionity-product-search__card {
    padding: 16px 0;
    border-radius: 40px;
  }

  .ionity-product-search.is-open.is-live-empty .ionity-product-search__panel {
    display: none;
  }
}

body.ionity-product-search-open {
  overflow: hidden;
  overscroll-behavior: none;
}

@keyframes ionity-product-search-backdrop-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes ionity-product-search-card-in {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes ionity-product-search-submit-in {
  from {
    opacity: 0;
    transform: scale(0.88);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ionity-product-search__backdrop,
  .ionity-product-search.is-open .ionity-product-search__card,
  .ionity-product-search.is-open .ionity-product-search__submit.is-appearing {
    animation: none;
  }

  .ionity-product-search.is-open .ionity-product-search__field,
  .ionity-product-search.is-open .ionity-product-search__submit {
    transition: none;
  }
}

@media (max-width: 1023.98px) {
  .header:has(.ionity-product-search-slot) .logo {
    max-width: 90px;
  }

  .ionity-product-search-slot {
    flex: 0 0 auto;
    min-height: 0;
    margin-left: auto;
  }

  .ionity-product-search {
    max-width: none;
    width: auto;
  }

  .ionity-product-search__trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 100px;
    background: #fff;
    color: #0d0d0d;
    cursor: pointer;
  }

  .ionity-product-search__trigger:hover {
    box-shadow: 0 4px 24px 0 rgba(44, 128, 255, 0.722);
  }

  .ionity-product-search.is-open .ionity-product-search__trigger {
    display: none;
  }

  .ionity-product-search:not(.is-open) .ionity-product-search__backdrop,
  .ionity-product-search:not(.is-open) .ionity-product-search__card {
    display: none !important;
  }

  .ionity-product-search.is-open.is-portaled {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    transform: none;
  }

  .ionity-product-search.is-open.is-portaled .ionity-product-search__card {
    position: fixed;
    inset: 0;
    left: 0;
    right: 0;
    top: 0;
    width: 100%;
    max-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
    background: #f4f4f9;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: ionity-product-search-card-in 0.22s ease-out both;
  }

  .ionity-product-search__mobile-head {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 74px;
    padding: 8px 24px 8px 24px;
    background: #fff;
    border-bottom: 1px solid #e6e6ee;
    position: relative;
    flex-shrink: 0;
    z-index: 2;
  }

  .ionity-product-search__back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #0d0d0d;
    cursor: pointer;
  }

  .ionity-product-search__mobile-title {
    margin: 0;
    font-size: 24px;
    font-weight: 500;
    line-height: 1.4;
    color: #000;
  }

  .ionity-product-search.is-open .ionity-product-search__form {
    padding: 12px 16px;
    background: #f4f4f9;
    border-bottom: 0;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
  }

  .ionity-product-search.is-open .ionity-product-search__field {
    min-height: 48px;
    padding: 8px 16px;
    border-color: #0d0d0d;
    background: #fff;
  }

  .ionity-product-search.is-open .ionity-product-search__icon {
    display: none;
  }

  .ionity-product-search.is-open .ionity-product-search__panel {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0 0 24px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .ionity-product-search__section-title {
    margin: 0 30px 10px;
    font-size: 12px;
    font-weight: 400;
    color: #2f2f2f;
    line-height: 24px;
  }

  .ionity-product-search__query {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 500;
    color: #000000;
  }

  .ionity-product-search__history-row .ionity-product-search__query {
    font-weight: 500;
    color: #000000;
  }

  .ionity-product-search__section[data-ionity-search-queries]
    .ionity-product-search__list
    > li:nth-child(n + 3),
  .ionity-product-search__section[data-ionity-search-history]
    .ionity-product-search__list
    > li:nth-child(n + 3),
  .ionity-product-search__section[data-ionity-search-popular]
    .ionity-product-search__products
    > li:nth-child(n + 3) {
    display: none;
  }

  .ionity-product-search__products {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 16px;
  }

  .ionity-product-search__products > li {
    margin: 0;
  }

  .ionity-product-search__product--rich {
    flex-direction: row-reverse;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
    background: #fff;
  }

  .ionity-product-search__product--rich:hover {
    background: #fff;
  }

  .ionity-product-search__product-body {
    flex: 1 1 auto;
    min-width: 0;
    gap: 4px;
  }

  .ionity-product-search__product-category {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.3;
    color: #0d0d0d;
  }

  .ionity-product-search__product-image {
    flex: 0 0 111px;
    width: 111px;
    height: 81px;
    border-radius: 12px;
    background: #ececf3;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .ionity-product-search__product-image img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
  }

  .ionity-product-search__product-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
  }

  .ionity-product-search__product-title {
    flex: 0 0 100%;
    order: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .ionity-product-search__product-badges--leading,
  .ionity-product-search__product-badges--trailing {
    order: 2;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .ionity-product-search__product-excerpt {
    display: none;
  }

  .ionity-product-search__results .ionity-product-search__products {
    padding: 0 16px;
  }

  .ionity-product-search__show-all {
    margin: 12px 16px 8px;
  }

  .ionity-product-search__results
    .ionity-product-search__products
    > li:nth-child(n + 5) {
    display: none;
  }

  .ionity-product-search__submit {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    flex: 0 0 48px;
  }

  .ionity-product-search.is-open .ionity-product-search__submit.is-visible {
    max-width: 48px;
    padding: 0;
  }

  .ionity-product-search__submit-text {
    display: none;
  }

  .ionity-product-search__submit-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .ionity-product-search__history-row {
    padding-right: 8px;
  }

  .ionity-product-search__query:hover,
  .ionity-product-search__history-row:hover {
    background: transparent;
  }

  .ionity-product-search__empty-state {
    gap: 10px;
  }
}

@media (max-width: 767.98px) {
  .ionity-product-search-slot {
    flex: 0 0 auto;
  }
}
