.reysa-smart-search-form {
  position: relative;
}

.reysa-smart-search {
  position: absolute;
  z-index: 1100;
  top: calc(100% + 8px);
  left: 0;
  width: min(520px, 100%);
  max-height: min(560px, 70vh);
  overflow-y: auto;
  padding: 8px;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(31, 31, 31, .14);
}

.reysa-smart-search[hidden] {
  display: none !important;
}

.reysa-smart-search__heading {
  padding: 8px 10px 6px;
  color: #707070;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.reysa-smart-search__option {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  color: #252525;
  text-decoration: none !important;
}

.reysa-smart-search__option:hover,
.reysa-smart-search__option:focus,
.reysa-smart-search__option.is-active {
  color: #bd2026;
  background: #fff5f4;
  outline: 2px solid rgba(189, 32, 38, .18);
}

.reysa-smart-search__thumb {
  display: grid;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #ededed;
  border-radius: 9px;
  background: #fafafa;
}

.reysa-smart-search__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.reysa-smart-search__copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.reysa-smart-search__copy strong {
  display: -webkit-box;
  overflow: hidden;
  color: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.reysa-smart-search__copy small {
  color: #bd2026;
  font-size: 13px;
  font-weight: 800;
}

.reysa-smart-search__category-icon {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  color: #bd2026;
  background: #fff0ef;
  font-size: 20px;
}

.reysa-smart-search__option--recent::before {
  content: "↻";
  color: #777;
  font-size: 18px;
}

.reysa-smart-search__all,
.reysa-smart-search__clear {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px;
  border: 0;
  border-top: 1px solid #eee;
  color: #bd2026;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.reysa-smart-search__empty,
.reysa-smart-search__status {
  margin: 0;
  padding: 12px 10px;
  color: #666;
  font-size: 13px;
  line-height: 1.5;
}

.reysa-search-category-matches,
.reysa-search-empty {
  margin: 14px 0 18px;
  padding: 16px;
  border: 1px solid #e8e8e8;
  border-radius: 14px;
  background: #fff;
}

.reysa-search-category-matches__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reysa-search-category-matches__links a {
  padding: 8px 12px;
  border: 1px solid #e4e4e4;
  border-radius: 999px;
  color: #333;
  background: #fafafa;
  font-size: 13px;
  font-weight: 700;
}

.reysa-search-category-matches__links a:hover {
  border-color: #bd2026;
  color: #bd2026;
}

.reysa-recently-viewed {
  padding: 34px 0 42px;
  background: #faf9f8;
}

.reysa-recently-viewed h2 {
  margin: 0 0 18px;
  color: #242424;
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 800;
}

.reysa-recently-viewed__grid,
.reysa-search-empty__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.reysa-recent-card {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  padding: 10px;
  border: 1px solid #e7e7e7;
  border-radius: 13px;
  color: #262626;
  background: #fff;
  text-decoration: none !important;
  transition: border-color .18s ease, transform .18s ease;
}

.reysa-recent-card:hover {
  border-color: #d8a6a8;
  color: #bd2026;
  transform: translateY(-1px);
}

.reysa-recent-card__image {
  display: grid;
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background: #f6f6f6;
}

.reysa-recent-card__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.reysa-recent-card__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.reysa-recent-card__copy strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.reysa-recent-card__copy small {
  color: #bd2026;
  font-size: 13px;
  font-weight: 800;
}

.reysa-search-empty h2 {
  margin: 0 0 6px;
  font-size: 21px;
}

.reysa-search-empty p {
  margin: 0 0 15px;
  color: #666;
}

.reysa-search-empty__all {
  display: inline-flex;
  margin-top: 16px;
  padding: 10px 16px;
  border-radius: 10px;
  color: #fff;
  background: #bd2026;
  font-weight: 800;
}

.product-favourite-kart a,
.product-favourite a {
  outline-offset: 3px;
}

.product-favourite-kart a:focus-visible,
.product-favourite a:focus-visible {
  outline: 2px solid #bd2026;
}

@media (max-width: 991.98px) {
  header.mobile .reysa-smart-search {
    position: fixed;
    top: 70px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: calc(100vh - 92px);
  }

  .reysa-recently-viewed__grid,
  .reysa-search-empty__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .reysa-smart-search {
    max-height: min(520px, 68vh);
    border-radius: 12px;
  }

  .reysa-smart-search__option {
    min-height: 48px;
    padding: 8px;
  }

  .reysa-smart-search__thumb {
    flex-basis: 46px;
    width: 46px;
    height: 46px;
  }

  .reysa-recently-viewed {
    padding: 26px 0 32px;
  }

  .reysa-recently-viewed__grid,
  .reysa-search-empty__grid {
    gap: 8px;
  }

  .reysa-recent-card {
    display: block;
    padding: 8px;
  }

  .reysa-recent-card__image {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    margin-bottom: 8px;
  }
}
