.apss {
  --apss-primary: #ff334b;
  --apss-border: #d9d9de;
  --apss-text: #171719;
  --apss-muted: #6e6e73;
  position: relative;
  width: 100%;
  color: var(--apss-text);
  font-family: inherit;
  line-height: 1.35;
  z-index: 9991;
}

.apss *, .apss *::before, .apss *::after { box-sizing: border-box; }

.apss__form {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  margin: 0;
}

.apss__input {
  width: 100%;
  height: 46px;
  margin: 0;
  padding: 0 92px 0 44px;
  border: 1px solid var(--apss-border);
  border-radius: 14px;
  outline: none;
  background: #fff;
  color: var(--apss-text);
  font: inherit;
  font-size: 15px;
  appearance: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.apss__input:focus {
  border-color: var(--apss-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--apss-primary) 18%, transparent);
}

.apss__input::-webkit-search-cancel-button { display: none; }

.apss__search-icon {
  position: absolute;
  left: 15px;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
  color: var(--apss-muted);
  pointer-events: none;
}

.apss__voice, .apss__clear {
  position: absolute;
  right: 43px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--apss-muted);
  cursor: pointer;
}

.apss__voice:hover, .apss__clear:hover { background: #f1f1f3; color: var(--apss-text); }
.apss__voice svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.8; }
.apss__voice.is-listening { color: #d70015; animation: apss-pulse 1s infinite; }
.apss__clear { right: 9px; font-size: 23px; font-weight: 300; line-height: 1; }

.apss__loader {
  position: absolute;
  right: 15px;
  width: 17px;
  height: 17px;
  border: 2px solid #ddd;
  border-top-color: var(--apss-primary);
  border-radius: 50%;
  animation: apss-spin .7s linear infinite;
}

.apss__clear:not([hidden]) ~ .apss__loader { right: 82px; }

.apss__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  max-height: min(620px, 70vh);
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(0,0,0,.09);
  border-radius: 18px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 24px 64px rgba(0,0,0,.18), 0 4px 16px rgba(0,0,0,.09);
  backdrop-filter: blur(20px);
  overscroll-behavior: contain;
}

.apss__section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 6px;
  color: var(--apss-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.apss__heading-action {
  padding: 2px 4px;
  border: 0;
  background: none;
  color: var(--apss-primary);
  font: inherit;
  cursor: pointer;
}

.apss__terms { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 8px 9px; }
.apss__term {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  background: #f2f2f4;
  color: var(--apss-text);
  font-size: 13px;
  text-decoration: none;
}

.apss__term:hover, .apss__term.is-active { background: color-mix(in srgb, var(--apss-primary) 12%, #fff); color: var(--apss-primary); }
.apss__results { display: grid; gap: 2px; }

.apss__result {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 18px;
  gap: 14px;
  align-items: center;
  min-height: 88px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: var(--apss-text);
  text-decoration: none;
  transition: background .12s ease;
}

.apss__result:hover, .apss__result.is-active { border-color: color-mix(in srgb, var(--apss-primary) 20%, #e5e5e7); background: color-mix(in srgb, var(--apss-primary) 5%, #fff); color: var(--apss-text); }
.apss__result.has-no-image { grid-template-columns: minmax(0, 1fr) 18px; }
.apss__result-image { width: 68px; height: 68px; padding: 3px; border: 1px solid #ededf0; border-radius: 11px; background: #f7f7f8; object-fit: contain; }
.apss__result-body { display: grid; min-width: 0; gap: 4px; }
.apss__result-title { display: -webkit-box; overflow: hidden; font-size: 14px; font-weight: 700; line-height: 1.35; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.apss__highlight { padding: 0 1px; border-radius: 3px; background: color-mix(in srgb, var(--apss-primary) 18%, #fff); color: inherit; font-weight: 800; }
.apss__result-meta { display: flex; flex-wrap: wrap; gap: 5px 10px; align-items: center; color: var(--apss-muted); font-size: 12px; }
.apss__price { color: var(--apss-text); font-weight: 700; }
.apss__price del { color: var(--apss-muted); font-weight: 400; }
.apss__price ins { text-decoration: none; }
.apss__stock::before { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: currentColor; content: ''; vertical-align: 1px; }
.apss__stock.is-in-stock { color: #248a3d; }
.apss__stock.is-out-of-stock { color: #d70015; }
.apss__excerpt { display: -webkit-box; overflow: hidden; color: var(--apss-muted); font-size: 12px; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
.apss__chevron { color: #a1a1a6; font-size: 24px; font-weight: 300; }

.apss__all-results {
  display: block;
  margin-top: 5px;
  padding: 11px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--apss-primary) 8%, #fff);
  color: var(--apss-primary);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.apss__all-results:hover, .apss__all-results.is-active { background: color-mix(in srgb, var(--apss-primary) 14%, #fff); color: var(--apss-primary); }
.apss__redirect { display: flex; align-items: center; gap: 10px; margin: 2px 2px 7px; padding: 11px 12px; border-radius: 10px; background: color-mix(in srgb, var(--apss-primary) 10%, #fff); color: var(--apss-primary); font-size: 13px; font-weight: 700; text-decoration: none; }
.apss__redirect:hover, .apss__redirect.is-active { background: color-mix(in srgb, var(--apss-primary) 16%, #fff); color: var(--apss-primary); }
.apss__redirect-icon { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--apss-primary); color: #fff; }
.apss__message { padding: 25px 15px; color: var(--apss-muted); font-size: 14px; text-align: center; }
.apss__message.is-error { color: #d70015; }
.apss__history-list { display: grid; gap: 2px; }
.apss__history-item { width: 100%; padding: 9px 11px; border: 0; border-radius: 9px; background: transparent; color: var(--apss-text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.apss__history-item::before { margin-right: 9px; color: var(--apss-muted); content: '↻'; }
.apss__history-item:hover, .apss__history-item.is-active { background: #f5f5f7; }
.apss__mobile-close, .apss__backdrop { display: none; }
body.apss-lock { overflow: hidden; }

@keyframes apss-spin { to { transform: rotate(360deg); } }
@keyframes apss-pulse { 50% { opacity: .4; } }

@media (max-width: 767px) {
  .apss.is-mobile-open { position: fixed; inset: 0; z-index: 999999; padding: 12px; background: #fff; }
  .apss.is-mobile-open .apss__form { width: calc(100% - 72px); }
  .apss.is-mobile-open .apss__mobile-close { position: absolute; top: 12px; right: 8px; display: block; height: 46px; padding: 0 8px; border: 0; background: none; color: var(--apss-primary); font: inherit; font-size: 14px; cursor: pointer; }
  .apss.is-mobile-open .apss__panel { top: 67px; right: 8px; bottom: 8px; left: 8px; max-height: none; border: 0; border-radius: 0; box-shadow: none; }
  .apss__result { grid-template-columns: 56px minmax(0, 1fr) 14px; min-height: 70px; }
  .apss__result-image { width: 56px; height: 56px; }
  .apss__excerpt { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .apss *, .apss *::before, .apss *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Flatsome Header Builder integration. The theme renders each header search via
   get_product_search_form(), which the plugin replaces server-side. */
.apss-theme-flatsome .header-search-form .apss,
.apss-theme-flatsome .header-search .apss,
.apss-theme-flatsome .searchform-wrapper .apss { width: 100%; min-width: 260px; }
.apss-theme-flatsome .nav-dropdown .apss { width: 320px; max-width: calc(100vw - 32px); }
.apss-theme-flatsome .search-lightbox .apss,
.apss-theme-flatsome .header-search-lightbox .apss { width: min(680px, calc(100vw - 32px)); margin-right: auto; margin-left: auto; }
.apss-theme-flatsome .header-wrapper.stuck .apss__panel { max-height: min(560px, calc(100vh - 90px)); }
.apss-theme-flatsome .apss__form { margin-bottom: 0; }
.apss-theme-flatsome .apss__input { box-shadow: none; }

@media (min-width: 768px) {
  .apss__panel {
    right: auto;
    left: 50%;
    width: min(540px, calc(100vw - 28px));
    min-width: min(480px, calc(100vw - 28px));
    transform: translateX(-50%);
  }

  .apss-theme-flatsome .header-search-form .apss,
  .apss-theme-flatsome .header-search .apss,
  .apss-theme-flatsome .searchform-wrapper .apss {
    width: clamp(300px, 24vw, 360px);
    min-width: 300px;
  }

  .apss-theme-flatsome .nav-dropdown .apss {
    width: min(420px, calc(100vw - 32px));
  }

  .apss-theme-flatsome .search-lightbox .apss,
  .apss-theme-flatsome .header-search-lightbox .apss {
    width: min(680px, calc(100vw - 32px));
  }
}
