/* Main Container */
.navbar-search {
  position: absolute;
  top: 7px;
  left: 25%;
  width: 50%;
  background: #fff;
  z-index: 2000;
  display: none;
  padding: 20px 20px 18px 20px !important;
  box-shadow: 0 15px 40px rgba(0,0,0,0.12);
  border-radius: 16px;
  flex-direction: column;
  
  /* Animation Base */
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.navbar-search.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Input Field Styling */
.navbar-search .input-group {
    background: #f1f3f5;
    border-radius: 30px;
    padding: 6px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.navbar-search .input-group:focus-within {
    background: #fff;
    border-color: #0a5c74;
    box-shadow: 0 0 0 3px rgba(10, 92, 116, 0.1);
}

.navbar-search .search-field {
    border: none;
    background: transparent;
    padding: 10px 20px;
    font-size: 16px;
    color: #333;
}

/* Results Suggestions */
.search-results-container {
    background: #fff;
    max-height: 500px;
    overflow-y: auto;
    margin-top: 15px;
    border-radius: 12px;
}

.ajax-search-results {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ajax-search-results li {
    border-bottom: 1px solid #f1f3f5;
    padding: 4px 0;
}

.ajax-search-results li:last-child {
    border-bottom: none;
}

.ajax-search-results li a {
    transition: all 0.2s ease;
    padding: 12px 10px !important;
    border-radius: 8px;
    display: flex;
    align-items: flex-start; /* Aligned to the top of the cover */
}

.ajax-search-results li a:hover {
    background: #f8f9fa !important;
}

/* Image/Cover Styling */
.search-item-image {
    width: 48px;
    height: 68px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    flex-shrink: 0;
}

/* Content Area - Tight Vertical Grouping */
.search-item-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 1px; /* Tighter vertical spacing */
    padding-top: 2px; /* Align perfectly with top edge of image */
}

/* Text Polish */
.product-title {
    color: #2c3e50;
    line-height: 1.1;
    font-size: 15px !important;
}

.author-name {
    color: #95a5a6 !important;
    font-weight: 400;
    margin-top: 2px;
}

.product-price {
    color: #0a5c74;
    font-weight: 700;
    font-size: 14px;
}

/* Highlighting - Fixing Background Box issue */
mark.search-highlight {
    background: transparent !important;
    background-color: transparent !important;
    color: #0a5c74 !important;
    padding: 0 !important;
    font-weight: 700 !important;
}

/* Badge Polish */
.badge-type {
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 600;
    flex-shrink: 0;
}

@media (max-width: 991.98px) {
  .navbar-search {
    width: 94%;
    left: 3%;
    top: 60px;
    padding: 15px !important;
  }
}