.product-search-dialog {
  width: min(720px, calc(100vw - 32px));
  max-width: none;
  max-height: min(760px, calc(100svh - 32px));
  padding: 0;
  border: 0;
  border-radius: 28px;
  color: #292522;
  background: #fffbf4;
  box-shadow: 0 30px 90px rgba(34, 24, 27, .28);
  overflow: hidden;
}

.product-search-dialog::backdrop {
  background: rgba(35, 28, 30, .58);
  backdrop-filter: blur(10px);
}

.product-search-panel {
  display: grid;
  gap: 20px;
  padding: clamp(24px, 5vw, 42px);
}

.product-search-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.product-search-head p {
  margin: 0 0 7px;
  color: #c96c50;
  font: 700 10px/1.4 "DM Sans", sans-serif;
  letter-spacing: .16em;
}

.product-search-head h2 {
  margin: 0;
  font-size: clamp(27px, 5vw, 38px);
  line-height: 1.15;
  letter-spacing: -.05em;
}

.product-search-head button {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(41, 37, 34, .14);
  border-radius: 50%;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.product-search-head button:hover,
.product-search-head button:focus-visible {
  color: #fff;
  background: #49283a;
}

.product-search-head button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.7;
}

.product-search-field {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 19px;
  border: 1px solid rgba(41, 37, 34, .2);
  border-radius: 17px;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.product-search-field > .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  border: 0;
  clip: rect(0, 0, 0, 0);
  overflow: hidden;
  white-space: nowrap;
}

.product-search-field:focus-within {
  border-color: #49283a;
  box-shadow: 0 0 0 3px rgba(73, 40, 58, .1);
}

.product-search-field svg {
  width: 22px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.product-search-field input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  font-size: 16px;
}

.product-search-field input::-webkit-search-cancel-button {
  cursor: pointer;
}

.product-search-status {
  min-height: 20px;
  margin: -7px 2px 0;
  color: #746e67;
  font-size: 12px;
  line-height: 1.6;
}

.product-search-results {
  max-height: min(430px, 50svh);
  display: grid;
  gap: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.product-search-result {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 16px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 17px;
  color: inherit;
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.product-search-result:hover,
.product-search-result:focus-visible {
  border-color: rgba(73, 40, 58, .12);
  background: #f7f3ea;
  outline: 0;
  transform: translateY(-1px);
}

.product-search-result img {
  width: 74px;
  height: 74px;
  display: block;
  border-radius: 13px;
  background: #f2ede4;
  object-fit: cover;
}

.product-search-result-copy {
  min-width: 0;
}

.product-search-result-copy span {
  display: block;
  margin-bottom: 5px;
  color: #c96c50;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.product-search-result-copy strong {
  display: block;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-search-result-copy small {
  display: block;
  margin-top: 4px;
  color: #746e67;
  font-size: 11px;
}

.product-search-result-arrow {
  font-size: 18px;
  text-align: center;
}

.product-search-empty {
  margin: 0;
  padding: 44px 20px;
  border-radius: 17px;
  color: #746e67;
  background: #f7f3ea;
  font-size: 14px;
  text-align: center;
}

.product-search-open {
  overflow: hidden;
}

@media (max-width: 620px) {
  .product-search-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100svh - 20px);
    border-radius: 22px;
  }

  .product-search-panel {
    gap: 16px;
    padding: 24px 18px;
  }

  .product-search-field {
    min-height: 56px;
  }

  .product-search-results {
    max-height: calc(100svh - 260px);
  }

  .product-search-result {
    grid-template-columns: 62px minmax(0, 1fr) 18px;
    gap: 12px;
    padding: 8px;
  }

  .product-search-result img {
    width: 62px;
    height: 62px;
  }
}
