/* Alternative Search System Styles */
/* File: alt-search.css */

/* Main Search Wrapper */
.alt-search-wrapper {
  position: relative;
  max-width: 500px;
  margin: 0 auto;
  z-index: 100;
}

/* Search Form Layout */
.alt-search-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* Search Input Field */
#productSearchField {
  flex: 1;
  min-width: 200px;
  height: 14px;
  padding: 14px 22px;
  border: 2px solid #14f100;

  border-radius: 30px;
  background: rgba(255, 255, 255, 0.95);
  color: #1f4283;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.3s ease;
  outline: none;
}

#productSearchField:focus {
  /* border-color: #0ec700; */
  background: #ffffff;
  /* box-shadow: 0 0 20px rgba(20, 241, 0, 0.35); */
  transform: translateY(-1px);
}

#productSearchField::placeholder {
  color: #1f4283;
  opacity: 0.65;
}

/* Search Button */
.alt-search-btn {
  background: linear-gradient(135deg, #14f100 0%, #0ec700 100%);
  color: #1f4283;
  border: none;
  padding: 14px 30px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(20, 241, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.alt-search-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.alt-search-btn:hover::before {
  width: 300px;
  height: 300px;
}

.alt-search-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(20, 241, 0, 0.5);
}

.alt-search-btn:active {
  transform: translateY(-1px);
}

.alt-search-btn i {
  margin-right: 6px;
}

/* Results Panel Container */
.alt-search-results-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 2px solid #14f100;
  border-radius: 18px;
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(20, 241, 0, 0.1);
  max-height: 450px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Individual Result Item */
.alt-search-result-item {
  padding: 15px 22px;
  cursor: pointer;
  border-bottom: 1px solid #e8e8e8;
  transition: all 0.25s ease;
  color: #333333;
  font-size: 14px;
  display: flex;
  align-items: center;
  position: relative;
}

.alt-search-result-item::before {
  content: '→';
  position: absolute;
  left: 10px;
  opacity: 0;
  transition: all 0.25s ease;
  color: #14f100;
  font-weight: bold;
}

.alt-search-result-item:hover {
  background: linear-gradient(90deg, rgba(20, 241, 0, 0.08), transparent);
  padding-left: 32px;
  color: #1f4283;
  font-weight: 600;
}

.alt-search-result-item:hover::before {
  opacity: 1;
  left: 12px;
}

.alt-search-result-item:first-child {
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

.alt-search-result-item:last-child {
  border-bottom: none;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

/* No Results Message */
.alt-no-results {
  padding: 30px 20px;
  text-align: center;
  color: #888;
  font-style: italic;
  font-size: 15px;
}

.alt-no-results::before {
  content: '🔍';
  display: block;
  font-size: 40px;
  margin-bottom: 10px;
}

/* More Results Info */
.alt-search-more-info {
  padding: 12px 20px;
  text-align: center;
  color: #0ec700;
  font-weight: 700;
  font-size: 13px;
  background: linear-gradient(180deg, transparent, #f8f9fa);
  border-top: 1px solid #e8e8e8;
  letter-spacing: 0.3px;
}

/* Custom Scrollbar */
.alt-search-results-panel::-webkit-scrollbar {
  width: 10px;
}

.alt-search-results-panel::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
  margin: 5px;
}

.alt-search-results-panel::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #14f100, #0ec700);
  border-radius: 10px;
  border: 2px solid #f1f1f1;
}

.alt-search-results-panel::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #0ec700, #0ab600);
}

/* Firefox Scrollbar */
.alt-search-results-panel {
  scrollbar-width: thin;
  scrollbar-color: #14f100 #f1f1f1;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .alt-search-wrapper {
    max-width: 100%;
    padding: 0 15px;
  }

  .alt-search-form {
    flex-direction: column;
    gap: 12px;
  }

  #productSearchField {
    width: 100%;
    min-width: 100%;
  }

  .alt-search-btn {
    width: 100%;
    padding: 14px 20px;
  }

  .alt-search-results-panel {
    max-height: 60vh;
  }

  .alt-search-result-item {
    padding: 13px 18px;
    font-size: 13px;
  }
}

/* Tablet Responsive */
@media (max-width: 992px) and (min-width: 769px) {
  .alt-search-wrapper {
    max-width: 600px;
  }

  #productSearchField {
    min-width: 250px;
  }
}

/* Loading State (Optional Enhancement) */
.alt-search-loading {
  padding: 20px;
  text-align: center;
  color: #666;
}

.alt-search-loading::after {
  content: '...';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}

/* Focus Visible for Accessibility */
#productSearchField:focus-visible {
  outline: 3px solid rgba(20, 241, 0, 0.4);
  outline-offset: 2px;
}

.alt-search-result-item:focus-visible {
  /* outline: 2px solid #14f100; */
  outline-offset: -2px;
}











.hero-search-container {
      position: relative;
      z-index: 1;
      max-width: 200px;
      margin: 0 auto;
    }
    .hero-search-form {
      display: flex;
      gap: 10px;
      justify-content: center;
      flex-wrap: wrap;
    }
    .hero-search-input {
      flex: 1;
      min-width: 100px;
	  height: 10px;
      padding: 14px 20px;
      border: 2px solid #14f100;
      border-radius: 30px;
      background: rgba(255,255,255,0.95);
      color: #1f2837;
      font-size: 14px;
      transition: all 0.3s ease;
      font-weight: 500;
    }
    .hero-search-input:focus {
       outline: none;
  box-shadow: none !important;
  border-color: inherit;
  background: inherit;
    }
    .hero-search-input::placeholder {
      color: #1f4283;
      opacity: 0.6;
    }
		 /* ---- Search Button (Same Style) ---- */
    .btn-search {
      background: linear-gradient(135deg, #14f100 0%, #0ec700 100%);
      color: #1f4283;
      border-color: #14f100;
      padding: 14px 35px;
      border-radius: 30px;
      font-weight: 600;
      font-size: 14px;
      text-transform: uppercase;
      letter-spacing: 0.8px;
      transition: all 0.3s ease;
      box-shadow: 0 4px 15px rgba(20,241,0,0.3);
      position: relative;
      overflow: hidden;
      cursor: pointer;
    }
    
    .btn-search::before {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      width: 0;
      height: 0;
      border-radius: 50%;
      background: rgba(255,255,255,0.4);
      transform: translate(-50%, -50%);
      transition: width 0.6s, height 0.6s;
    }
    
    .btn-search:hover::before {
      width: 300px;
      height: 300px;
    }
    
    .btn-search:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 25px rgba(20,241,0,0.5);
    }
    




/* --- FIXED NESTED DROPDOWN SECTION --- */

/* Default: Mobile-friendly layout (submenus open below) */
.dropdown-menu .dropdown-menu {
  position: static !important;
  margin-left: 0 !important;
  margin-top: 0.5rem;
  width: 100%; /* full width for mobile */
  overflow: hidden;
  border: none;
  box-shadow: none;
}

/* Prevent content from overflowing on small screens */
@media (max-width: 991px) {
  .dropdown-menu {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    max-height: 80vh; /* make scrollable if tall */
    position: relative;
    z-index: 9999;
  }

  /* Ensure nested dropdown items stay visible and aligned */
  .dropdown-menu .dropdown-menu {
    background: #fff;
    padding-left: 1rem;
    margin-top: 0.5rem;
    width: 100%;
  }
}

/* For large screens - open nested dropdowns to the right */
@media (min-width: 992px) {
  .navbar .dropdown-menu .dropdown-menu {
    position: absolute !important;
    top: 0;
    left: 100%;
    margin-top: 0;
    margin-left: 0.1rem;
    width: auto;
    overflow: visible;
    border-radius: 0.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 9999;
  }
}

