/* Juwan-guideline search — Figma frame 1090:2698 (exact) */

/* ---- Search input: beat Elementor header widget specificity ---- */
.elementor-334 .elementor-element.elementor-element-d715100 .thegem-te-search-form .search-field,
.elementor-widget-thegem-template-search-form .thegem-te-search-form .search-field,
.thegem-te-search-form .search-field {
  height: 46px !important;
  line-height: 46px !important;
  border-radius: 0 !important;
  border-style: solid !important;
  border-width: 1px !important;
  border-color: #0a0a0a !important;
  background: #fff !important;
  color: #0a0a0a !important;
  font-family: "YekanBakhFaNum", "YekanBakh", Tahoma, sans-serif !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  text-transform: none !important;
  padding: 0 44px 0 44px !important;
  text-align: right !important;
  box-shadow: none !important;
}

.elementor-334 .elementor-element.elementor-element-d715100 .thegem-te-search-form .search-field::-webkit-input-placeholder,
.elementor-334 .elementor-element.elementor-element-d715100 .thegem-te-search-form .search-field::placeholder,
.thegem-te-search-form .search-field::placeholder {
  color: #828282 !important;
  opacity: 1 !important;
  text-transform: none !important;
}

.elementor-334 .elementor-element.elementor-element-d715100 .thegem-te-search-form .search-buttons,
.thegem-te-search-form .search-buttons {
  right: auto !important;
  left: 0 !important;
  padding-right: 0 !important;
  padding-left: 12px !important;
  transform: translateY(-50%) !important;
}

.elementor-334 .elementor-element.elementor-element-d715100 .thegem-te-search-form .search-submit,
.thegem-te-search-form .search-submit {
  color: #0a0a0a !important;
  margin-left: 0 !important;
  width: 24px !important;
  height: 46px !important;
  line-height: 46px !important;
  font-size: 18px !important;
}

.elementor-334 .elementor-element.elementor-element-d715100 .thegem-te-search-form .search-submit:hover,
.thegem-te-search-form .search-submit:hover {
  color: #0a0a0a !important;
}

.elementor-334 .elementor-element.elementor-element-d715100 .thegem-te-search-form,
.thegem-te-search-form {
  font-size: 16px !important;
  text-transform: none !important;
  color: #0a0a0a !important;
}

/* Magnifier on the RIGHT (RTL start) */
.elementor-334 .elementor-element.elementor-element-d715100 .thegem-te-search-form form::after,
.thegem-te-search-form form::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  pointer-events: none;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230a0a0a'%3E%3Ccircle cx='11' cy='11' r='7' stroke-width='1.6'/%3E%3Cpath stroke-width='1.6' stroke-linecap='round' d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
  z-index: 2;
}

/* Hide TheGem search glyph; keep clear (X) on the left */
.elementor-334 .elementor-element.elementor-element-d715100 .thegem-te-search-form .search-submit .open,
.thegem-te-search-form .search-submit .open {
  display: none !important;
}

.thegem-te-search-form .search-submit.clear .close {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.thegem-te-search-form .search-submit.clear .close i.default:before {
  content: "×" !important;
  font-family: inherit !important;
  font-size: 22px !important;
  font-weight: 300 !important;
  line-height: 1 !important;
  color: #0a0a0a !important;
}

/* Widget container padding from Elementor was crushing the field — normalize */
.elementor-334 .elementor-element.elementor-element-d715100 > .elementor-widget-container {
  padding-right: 0 !important;
  margin-right: 0 !important;
}

/* ---- Dropdown panel ---- */
.thegem-te-search-form .ajax-search-results-wrap {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  width: 100%;
  background: #f9f9f9 !important;
  box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.2) !important;
  border: 0 !important;
  border-radius: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  z-index: 100;
}

.thegem-te-search-form.visible .ajax-search-results-wrap {
  display: block !important;
}

.thegem-te-search-form .ajax-search-results {
  max-height: min(72vh, 675px);
  overflow: auto;
}

.thegem-te-search-form .ajax-search-results .scroll-block.leboss-sr,
.thegem-te-search-form .ajax-search-results .leboss-sr {
  padding: 20px 28px 22px;
  box-sizing: border-box;
  direction: rtl;
  text-align: right;
  font-family: "YekanBakhFaNum", "YekanBakh", Tahoma, sans-serif;
  background: #f9f9f9;
}

.leboss-sr .lbs-heading {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 600;
  color: #000;
  line-height: 1.3;
}

.leboss-sr .lbs-section + .lbs-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #e6e6e6;
}

.leboss-sr .lbs-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.leboss-sr .lbs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 36px;
  margin: 0;
  padding: 3px 0;
}

.leboss-sr .lbs-term {
  flex: 1;
  min-width: 0;
  color: #000;
  font-size: 15px;
  font-weight: 400;
  text-decoration: none;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leboss-sr .lbs-term:hover {
  color: #0088ff;
}

.leboss-sr .lbs-cat {
  flex: 0 0 auto;
  max-width: 45%;
  color: #0088ff;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leboss-sr .lbs-cat:hover {
  text-decoration: underline;
}

.leboss-sr .lbs-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px 16px;
}

.leboss-sr .lbs-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #1a1a1a;
  text-decoration: none;
  text-align: right;
  min-width: 0;
}

.leboss-sr .lbs-card__img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #ececec;
}

.leboss-sr .lbs-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.leboss-sr .lbs-card__title,
.leboss-sr .lbs-card__price {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.03em;
  color: #1a1a1a;
}

.leboss-sr .lbs-card__title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leboss-sr .lbs-card__price .amount,
.leboss-sr .lbs-card__price del,
.leboss-sr .lbs-card__price ins,
.leboss-sr .lbs-card__price .woocommerce-Price-amount {
  color: inherit !important;
  text-decoration: none !important;
  background: none !important;
  font-size: inherit !important;
  font-weight: inherit !important;
}

.leboss-sr .lbs-card:hover .lbs-card__title {
  color: #0088ff;
}

.leboss-sr .lbs-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #e6e6e6;
  width: 100%;
  box-sizing: border-box;
  color: #0088ff;
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
  justify-content: flex-start;
}

.leboss-sr .lbs-all:hover {
  text-decoration: underline;
}

.leboss-sr .lbs-all__chev {
  width: 7px;
  height: 7px;
  border-left: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-top: 1px;
}

.leboss-sr .lbs-nothing {
  padding: 28px 12px;
  text-align: center;
  color: #828282;
  font-size: 15px;
}

/* Hide legacy TheGem chrome when new markup present */
.thegem-te-search-form .ajax-search-results .leboss-sr .title,
.thegem-te-search-form .ajax-search-results .leboss-sr .show-all,
.thegem-te-search-form.columns-2 .leboss-sr .ajax-search-item,
.thegem-te-search-form.columns-3 .leboss-sr .ajax-search-item,
.thegem-te-search-form.columns-4 .leboss-sr .ajax-search-item {
  display: none;
}

@media (max-width: 900px) {
  .leboss-sr .lbs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .thegem-te-search-form .ajax-search-results .scroll-block.leboss-sr,
  .thegem-te-search-form .ajax-search-results .leboss-sr {
    padding: 16px 14px 18px;
  }
}

@media (max-width: 560px) {
  .leboss-sr .lbs-cat {
    display: none;
  }
  .leboss-sr .lbs-heading,
  .leboss-sr .lbs-all {
    font-size: 15px;
  }
}
