/* ========================================================
   ANIKET MOTI ART • LUXURY HEADER LIVE SEARCH & AUTOCOMPLETE
   ======================================================== */

.ama-header-search-wrap {
  position: relative;
  width: 100%;
  max-width: 380px;
  margin: 0 12px;
  z-index: 60;
  display: flex !important;
  align-items: center !important;
  visibility: visible !important;
  opacity: 1 !important;
}

@media (max-width: 767px) {
  .ama-header-search-wrap {
    max-width: 220px;
    margin: 0 6px;
  }
}

@media (min-width: 1024px) {
  .ama-header-search-wrap {
    max-width: 440px;
    margin: 0 20px;
  }
}

.ama-header-search-box {
  display: flex;
  align-items: center;
  position: relative;
  background: #FFFDF9;
  border: 1.5px solid rgba(212, 175, 55, 0.45);
  border-radius: 9999px;
  height: 40px;
  padding: 0 12px;
  box-shadow: 0 2px 6px rgba(43, 24, 16, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ama-header-search-box:focus-within {
  background: #FFFFFF;
  border-color: #800020;
  box-shadow: 0 0 0 3px rgba(128, 0, 32, 0.12), 0 4px 14px rgba(128, 0, 32, 0.08);
}

.ama-search-icon {
  color: #D4AF37;
  font-size: 14px;
  flex-shrink: 0;
  margin-right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ama-header-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  font-family: inherit;
  color: #2B1810;
  padding: 0;
}

.ama-header-search-input::placeholder {
  color: #A08C82;
  font-size: 12.5px;
}

.ama-search-clear-btn {
  background: none;
  border: none;
  color: #800020;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 9999px;
  display: none;
  transition: opacity 0.15s ease;
}

.ama-search-clear-btn:hover {
  background: #FFF7ED;
}

.ama-search-shortcut-badge {
  display: none;
  align-items: center;
  font-size: 10px;
  font-family: monospace;
  font-weight: 600;
  color: #8C7355;
  background: #FAF6EF;
  border: 1px solid rgba(212, 175, 55, 0.4);
  padding: 1px 5px;
  border-radius: 5px;
  flex-shrink: 0;
  margin-left: 6px;
}

@media (min-width: 768px) {
  .ama-search-shortcut-badge {
    display: inline-flex;
  }
}

/* ========================================================
   AUTOCOMPLETE DROPDOWN
   ======================================================== */
.ama-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #FFFDF9;
  border: 1.5px solid #D4AF37;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(43, 24, 16, 0.22);
  z-index: 10000;
  max-height: 480px;
  overflow-y: auto;
  display: none;
  flex-direction: column;
  animation: amaSearchSlide 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.ama-search-header-bar {
  padding: 8px 14px;
  background: #FAF7F2;
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
  font-size: 11px;
  font-weight: 700;
  color: #800020;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ama-search-category-chips {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  background: #FFFFFF;
}

.ama-search-chip {
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 10.5px;
  font-weight: 600;
  background: #FAF7F2;
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: #5C4033;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.ama-search-chip:hover,
.ama-search-chip.active {
  background: #800020;
  color: #FFFFFF;
  border-color: #D4AF37;
}

.ama-search-results-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
}

.ama-search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.12s ease;
  border-bottom: 1px solid rgba(212, 175, 55, 0.12);
}

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

.ama-search-result-item:hover,
.ama-search-result-item.highlighted {
  background-color: #FFF5EA;
}

.ama-search-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-cover: cover;
  flex-shrink: 0;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background-color: #FFFFFF;
}

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

.ama-search-name {
  font-size: 13px;
  font-weight: 600;
  color: #2B1810;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ama-search-name mark {
  background: rgba(212, 175, 55, 0.3);
  color: #800020;
  font-weight: 700;
  padding: 0 1px;
  border-radius: 2px;
}

.ama-search-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  font-size: 11px;
}

.ama-search-category {
  color: #8C7355;
  font-weight: 500;
}

.ama-search-price {
  font-weight: 700;
  color: #800020;
}

.ama-search-compare {
  text-decoration: line-through;
  color: #9C897E;
  font-size: 10px;
}

.ama-search-footer {
  padding: 8px 14px;
  background: #FAF7F2;
  border-top: 1px solid rgba(212, 175, 55, 0.3);
  font-size: 11px;
  color: #8C7355;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ama-search-footer a {
  color: #800020;
  font-weight: 700;
  text-decoration: underline;
}

.ama-search-empty {
  padding: 24px 16px;
  text-align: center;
}

.ama-search-empty-icon {
  font-size: 28px;
  margin-bottom: 6px;
}

.ama-search-empty-title {
  font-size: 13px;
  font-weight: 700;
  color: #800020;
}

.ama-search-empty-desc {
  font-size: 11.5px;
  color: #8C7355;
  margin-top: 4px;
}

/* Mobile search tweaks */
@media (max-width: 640px) {
  .ama-header-search-wrap {
    max-width: 170px;
    margin: 0 4px;
  }
  .ama-header-search-box {
    height: 34px;
    padding: 0 8px;
  }
  .ama-header-search-input {
    font-size: 11.5px;
  }
  .ama-header-search-input::placeholder {
    font-size: 10.5px;
  }
  .ama-search-dropdown {
    position: fixed;
    top: 60px;
    left: 8px;
    right: 8px;
    max-height: 75vh;
  }
}
