.ritzy-search-open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.ritzy-search-open-btn:focus-visible,
.ritzy-search-close:focus-visible,
.ritzy-search-field button:focus-visible,
.ritzy-search-field input:focus-visible {
  outline: 2px solid #c80137;
  outline-offset: 2px;
}

.ritzy-search-overlay {
  position: fixed;
  z-index: 11111140;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: auto;
  background:
    radial-gradient(circle at 8% 18%, rgba(255, 214, 226, 0.55), transparent 28%),
    radial-gradient(circle at 96% 88%, rgba(255, 214, 226, 0.45), transparent 26%),
    #fffafa;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

body.ritzy-search-open {
  overflow: hidden;
}

body.ritzy-search-open .ritzy-search-overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ritzy-search-overlay__panel {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 88px 0 64px;
  transform: translateY(16px);
  opacity: 0;
  transition: transform 0.24s ease, opacity 0.24s ease;
}

body.ritzy-search-open .ritzy-search-overlay__panel {
  transform: none;
  opacity: 1;
}

.ritzy-search-close {
  position: fixed;
  z-index: 2;
  top: 22px;
  right: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 0;
  background: transparent;
  color: #1a1a1a;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.ritzy-search-kicker {
  margin: 0;
  color: #c80137;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2.4px;
  text-align: center;
  text-transform: uppercase;
}

.ritzy-search-title {
  margin: 10px 0 28px;
  color: #1a1a1a;
  font-family: Montserrat, Roboto, sans-serif;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
}

.ritzy-search-form {
  width: min(920px, 100%);
  margin: 0 auto;
}

.ritzy-search-field {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 8px 8px 8px 22px;
  border: 1.5px solid #f3b7c8;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(200, 1, 55, 0.06);
}

.ritzy-search-field > .fa-search {
  flex: 0 0 auto;
  color: #c80137;
  font-size: 18px;
}

.ritzy-search-field__rule {
  flex: 0 0 1px;
  width: 1px;
  height: 26px;
  background: #eadde1;
}

.ritzy-search-field input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 48px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #222;
  font-size: 16px;
  box-shadow: none;
}

.ritzy-search-field input:focus {
  outline: none;
}

.ritzy-search-field input::-webkit-search-decoration,
.ritzy-search-field input::-webkit-search-cancel-button {
  appearance: none;
}

.ritzy-search-field button {
  display: inline-flex;
  flex: 0 0 52px;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: #c80137;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.ritzy-search-field button:hover {
  background: #a0012d;
  color: #fff;
}

.ritzy-search-categories {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.ritzy-search-panel {
  width: min(1180px, 100%);
  margin: 42px auto 0;
}

.ritzy-search-panel__head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 22px;
}

.ritzy-search-panel__head .ritzy-search-kicker {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ritzy-search-panel__head .ritzy-search-kicker::before,
.ritzy-search-panel__head .ritzy-search-kicker::after {
  content: "";
  width: 72px;
  height: 1px;
  background: #eadde1;
}

.ritzy-search-count,
.ritzy-search-status {
  color: #888;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.ritzy-search-overlay .header-search-results-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.ritzy-search-overlay .ritzy-product-card {
  min-width: 0;
}

.ritzy-search-overlay .ritzy-product-card .product-img img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1.05;
  object-fit: cover;
}

.ritzy-search-overlay .is-loading {
  opacity: 0.55;
}

.ritzy-search-empty {
  margin: 12px 0 0;
  color: #666;
  font-size: 16px;
  text-align: center;
}

.ritzy-search-more {
  margin-top: 28px;
  text-align: center;
}

.ritzy-search-more .tf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 8px;
  background: #c80137;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.ritzy-search-more .tf-btn:hover {
  background: #a0012d;
  color: #fff;
}

@media (max-width: 1199px) {
  .ritzy-search-overlay .header-search-results-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .ritzy-search-open-btn {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .ritzy-search-overlay .header-search-results-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ritzy-search-title {
    font-size: 40px;
  }
}

@media (max-width: 767px) {
  .ritzy-search-overlay__panel {
    width: min(100% - 28px, 1280px);
    padding-top: 72px;
  }

  .ritzy-search-close {
    top: 10px;
    right: 8px;
  }

  .ritzy-search-title {
    margin-bottom: 20px;
    font-size: 30px;
  }

  .ritzy-search-field {
    min-height: 58px;
    gap: 8px;
    padding-left: 16px;
  }

  .ritzy-search-field button {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
  }

  .ritzy-search-overlay .header-search-results-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .ritzy-search-panel__head .ritzy-search-kicker::before,
  .ritzy-search-panel__head .ritzy-search-kicker::after {
    width: 28px;
  }
}

@media (max-width: 359px) {
  .ritzy-search-overlay__panel {
    width: min(100% - 20px, 1280px);
  }

  .ritzy-search-title {
    font-size: 26px;
  }

  .ritzy-search-overlay .header-search-results-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
