.z-ewls {
  --z-ewls-border: #d8deeb;
  --z-ewls-shadow: 0 12px 34px rgba(17, 24, 39, 0.12);
  --z-ewls-dropdown-z-index: 20;
  position: relative;
  display: grid;
  gap: 10px;
}

.z-ewls__input-wrap {
  position: relative;
}

.z-ewls__input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--z-ewls-border);
  border-radius: 14px;
  padding: 13px 52px 13px 50px;
  font-size: 15px;
  line-height: 1.4;
  color: #121826;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  box-sizing: border-box;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, padding-right 0.2s ease;
}

.z-ewls__input::placeholder {
  color: #7b8497;
}

.z-ewls__input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.14);
}

.z-ewls__spinner {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  transform: translateY(-50%);
  border: 2px solid rgba(79, 70, 229, 0.22);
  border-top-color: #4f46e5;
  opacity: 0;
  pointer-events: none;
}

.z-ewls.is-loading .z-ewls__spinner {
  opacity: 1;
  animation: z-ewls-spin 0.7s linear infinite;
}

.z-ewls__clear {
  position: absolute;
  right: 10px;
  top: 50%;
  width: 32px;
  height: 32px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #6f7a90;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.z-ewls__clear:hover {
  background: #eef2ff;
  color: #394256;
}

.z-ewls__clear:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.25);
}

.z-ewls__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  border: 1px solid #dce3f2;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--z-ewls-shadow);
  overflow: hidden;
  z-index: var(--z-ewls-dropdown-z-index);
}

.z-ewls__results {
  max-height: 420px;
  overflow: auto;
  padding: 10px;
}

.z-ewls__group + .z-ewls__group {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #edf1fb;
}

.z-ewls__category-title {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: #5a6375;
  padding: 6px 8px;
}

.z-ewls__product {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  border-radius: 10px;
  padding: 8px;
  transition: background-color 0.18s ease;
}

.z-ewls__product:hover {
  background: #f2f6ff;
}

.z-ewls__thumb {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 9px;
  object-fit: cover;
  background: #eff3fb;
}

.z-ewls__thumb--placeholder {
  display: inline-block;
  background: linear-gradient(135deg, #eceffd 0%, #dce3ff 100%);
}

.z-ewls__product-title {
  font-size: 14px;
  line-height: 1.35;
  color: #121826;
}

.z-ewls__state {
  padding: 12px 10px;
  color: #5a6375;
  font-size: 14px;
}

@keyframes z-ewls-spin {
  0% {
    transform: translateY(-50%) rotate(0deg);
  }
  100% {
    transform: translateY(-50%) rotate(360deg);
  }
}

@media (max-width: 767px) {
  .z-ewls__input {
    padding-right: 16px;
  }

  .z-ewls.has-value .z-ewls__input {
    padding-right: 52px;
  }
}
