/* SHIMA SHOES — live product search, site-wide.
   Typography is locked to the official Vazirmatn family loaded by the plugin. */

.shima-live-search-host {
  position: relative !important;
  overflow: visible !important;
  isolation: isolate;
}
.shima-live-search-host:focus-within { z-index: 5200; }

.shima-live-search-results {
  position: absolute;
  z-index: 5300;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  min-width: 320px;
  max-height: min(420px, 60vh);
  overflow: auto;
  padding: 7px;
  border: 1px solid #d9e6de;
  border-radius: 15px;
  background: rgba(255,255,255,.99);
  box-shadow: 0 18px 44px rgba(15,23,42,.14);
  direction: rtl;
  text-align: right;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-family: "Vazirmatn", sans-serif !important;
}
.shima-live-search-results[hidden] { display: none !important; }
.shima-live-search-results * { font-family: "Vazirmatn", sans-serif !important; }

.shima-search .shima-live-search-results {
  width: min(390px, calc(100vw - 24px));
}
.shima-qo-search .shima-live-search-results {
  width: 100%;
  min-width: 0;
}

.shima-live-search-item {
  width: 100%;
  min-height: 68px;
  padding: 7px 8px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #17211b;
  text-align: right;
  cursor: pointer;
  transition: background .14s ease;
}
.shima-live-search-item + .shima-live-search-item { border-top: 1px solid #edf2ef; }
.shima-live-search-item:hover,
.shima-live-search-item.is-active { background: #f0f8f3; }

.shima-live-search-thumb {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #e1ebe5;
  border-radius: 10px;
  background: #f8faf9;
}
.shima-live-search-thumb img {
  width: 100%;
  height: 100% !important;
  object-fit: contain;
}
.shima-live-search-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.shima-live-search-copy strong {
  overflow: hidden;
  color: #111827;
  font-size: 12.5px;
  line-height: 1.65;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shima-live-search-meta {
  overflow: hidden;
  color: #7a867f;
  font-size: 10px;
  line-height: 1.6;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shima-live-search-price {
  color: #07944f;
  font-size: 10.5px;
  line-height: 1.5;
  font-weight: 850;
  white-space: nowrap;
}
.shima-live-search-loading,
.shima-live-search-empty {
  padding: 13px 12px;
  color: #65726b;
  font-size: 11.5px;
  line-height: 1.8;
  text-align: center;
}

@media (max-width: 767px) {
  .shima-live-search-results {
    min-width: 0;
    width: 100% !important;
    max-height: min(390px, 56vh);
    top: calc(100% + 6px);
    border-radius: 13px;
  }
  .shima-live-search-item {
    min-height: 62px;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 9px;
    padding: 7px;
  }
  .shima-live-search-thumb {
    width: 46px;
    height: 46px;
  }
  .shima-live-search-price {
    grid-column: 2;
    justify-self: start;
    margin-top: -2px;
    font-size: 10px;
  }
}


/* 1.4.3 refinements */
.shima-live-search-item {
  box-sizing: border-box !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}
.shima-live-search-copy strong {
  font-size: 13.5px !important;
  line-height: 1.7 !important;
  font-weight: 800 !important;
}
.shima-live-search-meta {
  font-size: 10.8px !important;
  line-height: 1.75 !important;
  font-weight: 600 !important;
}
.shima-live-search-price {
  font-size: 11.5px !important;
  line-height: 1.7 !important;
  font-weight: 900 !important;
}


/* 1.4.4 — intentionally minimal result content: image, name, stock only. */
.shima-live-search-item {
  grid-template-columns: 58px minmax(0, 1fr) auto !important;
  min-height: 76px !important;
  padding: 8px 10px !important;
  gap: 11px !important;
}
.shima-live-search-thumb {
  width: 58px !important;
  height: 58px !important;
  border-radius: 11px !important;
}
.shima-live-search-copy {
  align-self: center;
}
.shima-live-search-copy strong {
  display: -webkit-box !important;
  overflow: hidden !important;
  color: #111827 !important;
  font-size: 13.5px !important;
  line-height: 1.8 !important;
  font-weight: 850 !important;
  white-space: normal !important;
  text-overflow: clip !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.shima-live-search-stock {
  min-width: 58px;
  min-height: 30px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 11px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  white-space: nowrap;
}
.shima-live-search-stock.is-in-stock {
  color: #08783f;
  border: 1px solid #c9ead6;
  background: #edf9f2;
}
.shima-live-search-stock.is-out-of-stock {
  color: #b42318;
  border: 1px solid #f4c7c3;
  background: #fff1f0;
}
/* Legacy fields from older cached markup must never be shown. */
.shima-live-search-meta,
.shima-live-search-price {
  display: none !important;
}
@media (max-width: 767px) {
  .shima-live-search-item {
    grid-template-columns: 50px minmax(0, 1fr) auto !important;
    min-height: 68px !important;
  }
  .shima-live-search-thumb {
    width: 50px !important;
    height: 50px !important;
  }
  .shima-live-search-copy strong {
    font-size: 12.5px !important;
  }
  .shima-live-search-stock {
    min-width: 52px;
    min-height: 28px;
    padding-inline: 8px;
    font-size: 10px !important;
  }
}
