/* ==========================================================================
   Astra Jordan - Product Instant Search & Highlight Styles
   ========================================================================== */

.astra-product-search-container {
  max-width: 780px;
  margin: 25px auto 35px auto;
  padding: 0 15px;
  box-sizing: border-box;
  position: relative;
  z-index: 1000;
}

.astra-search-wrapper {
  position: relative;
  width: 100%;
}

.astra-search-input-box {
  display: flex;
  align-items: center;
  position: relative;
  background: #ffffff;
  border: 2px solid #809db0;
  border-radius: 30px;
  padding: 8px 18px;
  box-shadow: 0 4px 15px rgba(1, 114, 178, 0.1);
  transition: all 0.25s ease-in-out;
}

.astra-search-input-box:focus-within {
  border-color: #0172b2;
  box-shadow: 0 6px 20px rgba(1, 114, 178, 0.25);
  transform: translateY(-1px);
}

.astra-search-icon {
  color: #0172b2;
  flex-shrink: 0;
  margin-right: 12px;
}

.astra-search-wrapper[style*="direction: rtl"] .astra-search-icon {
  margin-right: 0;
  margin-left: 12px;
}

.astra-search-input {
  width: 100%;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 15px;
  color: #1e293b;
  background: transparent;
  padding: 4px 0;
}

.astra-search-input::placeholder {
  color: #94a3b8;
  font-size: 14px;
}

.astra-search-clear {
  background: #f1f5f9;
  border: none;
  outline: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #64748b;
  font-size: 16px;
  line-height: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  margin-left: 8px;
}

.astra-search-wrapper[style*="direction: rtl"] .astra-search-clear {
  margin-left: 0;
  margin-right: 8px;
}

.astra-search-clear:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Dropdown list */
.astra-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.15);
  max-height: 380px;
  overflow-y: auto;
  z-index: 99999;
  padding: 6px 0;
  animation: astraSearchFadeIn 0.2s ease-out;
}

@keyframes astraSearchFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.astra-search-item {
  padding: 10px 18px;
  cursor: pointer;
  transition: background 0.15s ease-in-out;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
}

.astra-search-item:last-child {
  border-bottom: none;
}

.astra-search-item:hover,
.astra-search-item.active {
  background: #f0f7fc;
}

.astra-search-item-info {
  flex: 1;
  min-width: 0;
}

.astra-search-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}

.astra-search-item-title {
  font-weight: 700;
  font-size: 14.5px;
  color: #0172b2;
}

.astra-search-item-badge {
  background: rgba(1, 114, 178, 0.1);
  color: #0172b2;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap;
}

.astra-search-item-sub {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 3px;
}

.astra-search-item-active {
  font-size: 11.5px;
  color: #475569;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.astra-search-no-results {
  padding: 18px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

/* ==========================================================================
   Product Card Glowing Pulse Effect (Smooth Scroll Destination)
   ========================================================================== */
.astra-product-glow {
  position: relative;
  animation: astraPulseGlow 2.8s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
  border-radius: 12px;
}

@keyframes astraPulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(1, 114, 178, 0.7);
    outline: 3px solid rgba(1, 114, 178, 0.9);
  }
  30% {
    box-shadow: 0 0 35px 8px rgba(1, 114, 178, 0.5);
    outline: 3px solid #0172b2;
  }
  70% {
    box-shadow: 0 0 25px 4px rgba(246, 178, 107, 0.4);
    outline: 2px solid #f6b26b;
  }
  100% {
    box-shadow: none;
    outline: none;
  }
}
