/* Search dropdown styles */
.header-search {
  max-width: 540px;
  margin: 0 auto;
}

.header-search input {
  padding: 12px 50px 12px 20px;
  border: 1px solid #efefef;
  font-size: 14px;
  transition: all 0.3s ease;
}

.header-search input:focus {
  outline: none;
  border-color: #000;
  box-shadow: 0 0 0 0.2rem rgba(0,0,0,0.05);
}

.header-search .search-btn {
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  font-size: 18px;
  color: #6c757d;
  cursor: pointer;
  transition: color 0.2s ease;
}

.header-search .search-btn:hover {
  color: #000;
}

/* Desktop Dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 8px 26px rgba(0,0,0,0.1);
  max-height: 480px;
  overflow-y: auto;
  z-index: 1050;
  animation: slideDown 0.2s ease-out;
}

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

.search-dropdown.d-none {
  display: none !important;
}

.search-dropdown.d-block {
  display: block !important;
}

/* Search Results Container */
.search-results-container {
  padding: 16px;
}

.search-section {
  padding: 12px 0;
  margin-bottom: 16px;
}

.search-section:last-child {
  margin-bottom: 0;
}

.search-section h6 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #6c757d;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.search-section ul li {
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
  transition: background-color 0.2s ease;
}

.search-section ul li:last-child {
  border-bottom: none;
}

.search-section ul li:hover {
  background-color: #f9f9f9;
  border-radius: 4px;
}

.search-section ul li a {
  text-decoration: none;
  color: #212529;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 4px 8px;
}

.search-section ul li a:hover {
  color: #000;
}

.search-section .product-thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #f0f0f0;
}

.search-section .brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

/* Loading state */
.search-section .spinner-border {
  width: 1.5rem;
  height: 1.5rem;
  border-width: 0.15em;
}

/* See all button */
.search-dropdown .btn-dark {
  background-color: #000;
  border-color: #000;
  padding: 8px 24px;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.search-dropdown .btn-dark:hover {
  background-color: #333;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Mobile Search Modal Styles */
#mobile-search-modal .offcanvas-header {
  background-color: #fff;
  border-bottom: 1px solid #dee2e6;
}

#mobile-search-modal .offcanvas-body {
  padding: 20px;
}

#mobile-search-modal input {
  padding: 12px 50px 12px 20px;
  border: 1px solid #dee2e6;
  font-size: 14px;
}

#mobile-search-modal .search-btn {
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  font-size: 18px;
  color: #6c757d;
  cursor: pointer;
}

/* Scrollbar styling */
.search-dropdown::-webkit-scrollbar {
  width: 6px;
}

.search-dropdown::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.search-dropdown::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

.search-dropdown::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Search result item styles (from API HTML) */
.bg-img {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.srch-img {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  border: 1px solid #f0f0f0;
}

.brand-txt {
  font-size: 12px;
  font-weight: 600;
  color: #000 !important;
}

.desc {
  font-size: 13px;
  font-weight: 400;
  color: #333 !important;
  line-height: 1.3;
}

.price-txt {
  font-size: 11px;
  color: #666 !important;
}

.c-black {
  color: #000 !important;
}

/* Responsive */
@media (max-width: 991px) {
  .header-search {
    max-width: 100%;
  }

  .search-dropdown {
    position: static;
    box-shadow: none;
    border-radius: 0;
    margin-top: 0.5rem;
  }
}
