/* ──────────────────────────────────────────────
   Premium Search Autocomplete — Styles (AAN Luxe)
   ────────────────────────────────────────────── */

/* Override the default search-suggestions to be a proper dropdown */
.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: -20px;
  right: -20px;
  min-width: 440px;
  background: #ffffff;
  border: 1px solid rgba(200, 169, 106, 0.22);
  border-radius: 16px;
  box-shadow:
    0 16px 48px rgba(62, 45, 36, 0.12),
    0 4px 16px rgba(0, 0, 0, 0.05);
  max-height: 540px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 9999;
  display: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(200, 169, 106, 0.3) transparent;
}

.search-suggestions::-webkit-scrollbar {
  width: 5px;
}

.search-suggestions::-webkit-scrollbar-track {
  background: transparent;
}

.search-suggestions::-webkit-scrollbar-thumb {
  background: rgba(200, 169, 106, 0.35);
  border-radius: 10px;
}

/* Dropdown container */
.ac-dropdown {
  padding: 6px 0;
}

/* Section */
.ac-section {
  padding: 12px 18px 10px;
}

.ac-section+.ac-section {
  border-top: 1px solid #f3ede6;
}

.ac-section-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #6F5846;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ac-section-title > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.ac-section-title i {
  font-size: 12px;
}

.ac-count {
  color: #C8A96A;
  font-weight: 600;
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0;
}

.ac-badge-pill {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(200, 169, 106, 0.16);
  color: #7A5826;
}

/* Clear Recent Search Button */
.ac-clear-history-btn {
  background: none;
  border: none;
  font-size: 11px;
  font-weight: 600;
  color: #9ca3af;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.18s ease;
  text-transform: none;
  letter-spacing: 0;
}

.ac-clear-history-btn:hover {
  color: #e11d48;
  text-decoration: underline;
}

/* ─── Popular Searches (Quick Tags) ─── */
.ac-popular-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ac-popular-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: #3E2D24;
  background: #FAF6F0;
  border: 1px solid #EFE4D6;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ac-popular-tag i {
  font-size: 11px;
  color: #C8A96A;
  transition: transform 0.2s ease, color 0.2s ease;
}

.ac-popular-tag:hover {
  background: #3E2D24;
  color: #ffffff;
  border-color: #3E2D24;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(62, 45, 36, 0.18);
}

.ac-popular-tag:hover i {
  color: #E6CA92;
  transform: scale(1.15);
}

/* ─── Recent Searches ─── */
.ac-recent-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ac-recent-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: #4B3E36;
  background: #f4f4f5;
  border: 1px solid #e4e4e7;
  cursor: pointer;
  transition: all 0.18s ease;
}

.ac-recent-chip:hover {
  background: #C8A96A;
  color: #ffffff;
  border-color: #C8A96A;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(200, 169, 106, 0.28);
}

/* ─── Product Item ─── */
.ac-products-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ac-product-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
  border: 1px solid transparent;
}

.ac-product-item:hover {
  background: #FAF6F0;
  border-color: rgba(200, 169, 106, 0.25);
  transform: translateX(2px);
}

.ac-product-img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f5f3f0;
  border: 1px solid #e8ddd6;
}

.ac-product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ac-product-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.ac-product-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #1a1a2e;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  line-height: 1.3;
  margin-bottom: 3px;
}

.ac-product-title mark {
  background: rgba(200, 169, 106, 0.2);
  color: #3E2D24;
  padding: 0 3px;
  border-radius: 3px;
}

.ac-product-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.ac-product-cat {
  color: #8b8f98;
  font-weight: 500;
}

.ac-product-price {
  color: #16a34a;
  font-weight: 700;
}

.ac-item-action {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Modern Trending Tag */
.ac-trend-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: #FFF1F2;
  color: #E11D48;
  border: 1px solid #FFE4E6;
  letter-spacing: 0.3px;
}

.ac-trend-tag i {
  font-size: 10px;
}

/* Right Chevron Arrow */
.ac-arrow-icon {
  font-size: 11px;
  color: #d1d5db;
  transition: transform 0.2s ease, color 0.2s ease;
}

.ac-product-item:hover .ac-arrow-icon {
  color: #C8A96A;
  transform: translateX(3px);
}

/* ─── Category Chips ─── */
.ac-section-cats {
  padding-bottom: 12px;
}

.ac-cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ac-cat-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  color: #3E2D24;
  background: #ffffff;
  border: 1.5px solid #E8DDD6;
  text-decoration: none;
  transition: all 0.18s ease;
}

.ac-cat-chip:hover {
  background: linear-gradient(135deg, #3E2D24, #C8A96A);
  color: #ffffff;
  border-color: #3E2D24;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(200, 169, 106, 0.25);
  text-decoration: none;
}

/* ─── Footer ─── */
.ac-footer {
  padding: 12px 18px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #3E2D24;
  cursor: pointer;
  border-top: 1px solid #f3ede6;
  background: #FAF6F0;
  transition: all 0.18s ease;
  border-radius: 0 0 16px 16px;
}

.ac-footer:hover {
  background: #3E2D24;
  color: #ffffff;
}

.ac-footer i {
  margin-left: 6px;
  transition: transform 0.2s ease;
}

.ac-footer:hover i {
  transform: translateX(4px);
  color: #C8A96A;
}

/* ─── Keyboard Navigation Active State ─── */
.ac-product-item.ac-item-active,
.ac-popular-tag.ac-item-active,
.ac-recent-chip.ac-item-active,
.ac-cat-chip.ac-item-active,
.ac-footer.ac-item-active {
  background: linear-gradient(135deg, #3E2D24, #C8A96A) !important;
  color: #ffffff !important;
  border-color: #3E2D24 !important;
}

.ac-product-item.ac-item-active .ac-product-title,
.ac-product-item.ac-item-active .ac-product-cat,
.ac-product-item.ac-item-active .ac-product-price,
.ac-popular-tag.ac-item-active i {
  color: #ffffff !important;
}

.ac-product-item.ac-item-active mark {
  background: #ffffff !important;
  color: #3E2D24 !important;
}

/* ─── Empty State ─── */
.ac-empty {
  padding: 32px 20px;
  text-align: center;
  color: #8b8f98;
}

.ac-empty i {
  font-size: 32px;
  margin-bottom: 12px;
  color: #d1d5db;
  display: block;
}

.ac-empty p {
  font-size: 14px;
  font-weight: 600;
  color: #3E2D24;
  margin-bottom: 4px;
}

.ac-empty span {
  font-size: 12px;
  color: #9ca3af;
}

/* ─── Skeleton ─── */
.skel-line,
.skel-box {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 37%, #f0f0f0 63%);
  background-size: 400% 100%;
  animation: skel-shimmer 1.4s ease-in-out infinite;
  border-radius: 6px;
  display: block;
}

@keyframes skel-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

/* ─── Mobile Override ─── */
@media (max-width: 991.98px) {
  .search-suggestions {
    position: fixed;
    top: 70px;
    left: 10px;
    right: 10px;
    min-width: unset;
    max-height: calc(100vh - 90px);
    border-radius: 16px;
  }
}

@media (max-width: 576px) {
  .search-suggestions {
    top: 60px;
    left: 6px;
    right: 6px;
    max-height: calc(100vh - 80px);
  }

  .ac-product-img {
    width: 42px;
    height: 42px;
  }

  .ac-product-title {
    font-size: 13px;
  }

  .ac-section {
    padding: 10px 14px 8px;
  }
}

/* ──────────────────────────────────────────────
   Explore More Categories — Bottom of Search Results
   ────────────────────────────────────────────── */
.explore-cats-section {
  padding: 32px 0 40px;
  text-align: center;
}

.explore-cats-title {
  font-size: 18px;
  font-weight: 700;
  color: #3E2D24;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.explore-cats-title i {
  color: #C8A96A;
  font-size: 16px;
}

.explore-cats-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.explore-cat-chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  color: #3E2D24;
  background: #ffffff;
  border: 2px solid #E8DDD6;
  text-decoration: none;
  transition: all 0.22s ease;
  cursor: pointer;
}

.explore-cat-chip:hover {
  background: linear-gradient(135deg, #D7C1A1, #C8A96A);
  color: #3E2D24;
  border-color: #3E2D24;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(200, 169, 106, 0.3);
  text-decoration: none;
}

.explore-cat-chip:active {
  transform: translateY(0);
}

@media (max-width: 576px) {
  .explore-cats-chips {
    gap: 8px;
  }

  .explore-cat-chip {
    padding: 8px 16px;
    font-size: 13px;
  }

  .explore-cats-title {
    font-size: 16px;
  }
}

/* Ensure mobile overlay suggestions never get treated as absolute floating dropdown */
.mobile-search-overlay .search-suggestions,
.mobile-search-overlay .mobile-search-suggestions,
#mobileSearchSuggestions {
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  background: #ffffff !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 16px 18px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}