/* ==========================================================
   0) Base input styles
   ========================================================== */
   .dn-search-field {
    text-align: left !important;
    outline: none !important;
  }
  
  /* ==========================================================
       1) Outer overlay styling
       ========================================================== */
  .suggestions-container {
    position: absolute;
    left: 0;
    width: 100%;
    background: #fff;
    z-index: 10000;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-bottom-right-radius: 8px;
    border-bottom-left-radius: 8px;
    border: 1px solid #ccc;
  }


  #search_bar .dn-search-field-container input {
    padding-left: 40px !important;
  }

  #search_pt {
    margin-left: 44px !important;
  }
  
  /* ==========================================================
       2) Centered inner wrapper: sidebar + main area
       ========================================================== */
  .suggestions-inner {
    display: flex;
    width: 80vw;
    max-width: 1280px;
    margin: 0 auto;
    gap: 16px;
    box-sizing: border-box;
  }
  
  /* ==========================================================
       3) Sidebar (facets)
       ========================================================== */
  .suggestions-container .search-facets {
    flex-shrink: 0;
    width: 200px;
    padding: 16px;
    box-sizing: border-box;
    border-right: 1px solid #eee;
    background: #fff;
  }
  
  /* ==========================================================
       4) Main area: recents above, grid below
       ========================================================== */
  .suggestions-container .suggestions-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-sizing: border-box;
  }
  
  /* ==========================================================
       5) Recent‐searches bar
       ========================================================== */
  .suggestions-container .recent-searches {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-bottom: 1px solid #eee;
    box-shadow: none;
    flex: none;
  }
  
  /* ==========================================================
       6) Results grid (desktop: 3 per row)
       ========================================================== */
  .suggestions-container .suggestions-dropdown {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 16px 0;
    overflow-y: auto;
    box-sizing: border-box;
  }
  
  /* ==========================================================
       7) Product cards
       ========================================================== */
  .search-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
  }
  .search-card:hover {
    background: #f9f9f9;
    transform: translateY(-2px);
  }
  .search-card img {
    width: 100%;
    width: 100%;
    height: auto;
    margin-bottom: 8px;
    border-radius: 4px;
  }
  .product-name {
    font-size: 14px;
    font-weight: 600;
    margin-top: 8px;
    margin-bottom: 6px;
    color: #333;
  }
  .price {
    font-size: 13px;
    line-height: 1.3;
    color: #1f478c !important;
    font-weight: 600 !important;
  }
  
  /* ==========================================================
       8) “Show more” link
       ========================================================== */
  .show-more {
    grid-column: 1 / -1;
    text-align: center;
    padding: 12px 0;
    font-weight: 600;
    cursor: pointer;
    color: #1f478c;
  }
  .show-more:hover {
    text-decoration: underline;
  }
  
  /* ==========================================================
       9) Dropdown title
       ========================================================== */
  .dropdown-title {
    grid-column: 1 / -1;
    font-size: 14px;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    margin-bottom: 8px;
  }
  
  /* ==========================================================
      10) Recent items & Clear-all button
       ========================================================== */
  .recent-item {
    padding: 4px 8px;
    background: #f0f0f0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: #333;
  }
  .recent-item:hover {
    background: #e0e0e0;
  }
  .clear-all {
    margin-left: auto;
    padding: 4px 8px;
    background: #1f478c !important;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: #fff !important;
  }
  .clear-all:hover {
    background: #e0e0e0;
  }
  
  /* ==========================================================
      11) Voice‐search button
       ========================================================== */
  .voice-search-btn {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    color: #555;
  }
  .voice-search-btn.listening {
    color: #d00;
    animation: pulse 1s infinite;
  }
  @keyframes pulse {
    0%,
    100% {
      opacity: 1;
    }
    50% {
      opacity: 0.5;
    }
  }
  /* .dn-search-field-container input {
    padding-right: 36px;
  }
  .dn-search-field-container input:focus {
    border-bottom: 1px solid #000 !important;
  } */
  
  /* ==========================================================
      Mobile-only Filter & Apply buttons (≤480px)
       ========================================================== */
  .filter-toggle-btn,
  .apply-filters-btn {
    display: none;
  }
  
  @media screen and (max-width: 480px) {
    /* Hide the sidebar by default */
    .suggestions-container .search-facets {
      display: none;
    }
  
    /* Show “Filters” toggle button at top */
    .filter-toggle-btn {
      display: block;
      width: 90vw;
      max-width: 360px;
      margin: 0.5em auto;
      padding: 0.75em;
      background: #1f478c !important;
      color: #fff;
      font-size: 14px;
      font-weight: 600;
      text-align: center;
      border: none;
      border-radius: 4px;
    }
  
    /* “Apply” button inside facets */
    .apply-filters-btn {
      display: block;
      width: calc(100% - 32px);
      margin: 1em 16px 0;
      padding: 0.75em;
      background: #28a745;
      color: #fff;
      font-size: 14px;
      font-weight: 600;
      text-align: center;
      border: none;
      border-radius: 4px;
    }
  
    /* Lock overlay scroll only */
    .suggestions-container.open {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      overflow-y: auto;
      overscroll-behavior: contain;
    }
  }
  /* ==========================================================
      Tablet (≤768px): stack facets above & 2-column grid
       ========================================================== */
  @media screen and (max-width: 768px) {
    .suggestions-inner {
      flex-direction: column;
      width: 90vw;
      max-width: none;
      gap: 0;
      margin: 0 auto;
    }
    .suggestions-container .search-facets {
      width: 100%;
      border-right: none;
      border-bottom: 1px solid #eee;
      padding: 8px;
    }
    .suggestions-container .suggestions-main {
      margin-left: 0;
      padding: 8px 0;
    }
    .suggestions-container .suggestions-dropdown {
      grid-template-columns: repeat(2, 1fr);
      gap: 6px;
      padding: 8px 0;
    }
  }
  
  /* ==========================================================
      Desktop (≥769px): sidebar + main side-by-side
       ========================================================== */
  @media screen and (min-width: 769px) {
    .suggestions-inner {
      flex-direction: row;
    }
    /* .suggestions-container .suggestions-main {
        margin-left: 200px;
      } */
  }
  
  .facet-section {
    margin-bottom: 16px;
  }
  
  .facet-section h4 {
    margin-bottom: 10px !important;
    font-weight: 700;
    font-size: 16px;
    background-color: #1f478c !important;
    color: #fff !important;
    padding: 8px 10px;
    border-radius: 4px;
  }
  
  .facet-section ul li {
    margin-bottom: 6px !important;
  }
  
  .facet-section ul li label {
    display: flex;
    align-items: center;
    gap: 4px;
  }