/* Стили для поиска */
.search-container {
    margin: 20px auto;
    max-width: 600px;
    position: relative;
    width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
}
#searchInput {
    width: 100%;
    padding: 10px 15px;
    border-radius: 25px;
    border: 1px solid #ccc;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    outline: none;
    font-family: Pompadur;
    transition: all 0.3s ease;
}

#searchInput:focus {
    border-color: rgb(205,11,12);
    box-shadow: 0 0 5px rgba(205,11,12,0.3);
}

.results-count {
    display: none; /* Скрываем по умолчанию */
    text-align: left;
    margin: 10px 0 5px;
    font-family: Pompadur;
    font-size: 14px;
}

.search-results-title {
    text-align: left;
    margin: 15px 0 5px;
    font-size: 1.2em;
    display: none;
}

#clearSearch {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    font-size: 18px;
    padding: 0;
    width: 20px;
    height: 20px;
    display: none;
}

#clearSearch:hover {
    color: #ff4757;
}

#searchResults {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 15px;
    width: 100%;
    margin-top: 10px;
}

/* Стили для светлой темы */
.results-count {
    color: rgb(43, 36, 43);
}

.search-results-title {
    color: rgb(43, 36, 43);
}

.results-count strong {
    color: rgb(205,11,12);
}



/* Адаптивность */
@media screen and (max-width: 768px) {
    .search-container {
        padding: 0 10px;
    }
    
    #searchResults {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media screen and (max-width: 480px) {
    #searchResults {
        grid-template-columns: 1fr;
    }
}

  .search-container {
    margin: 20px auto;
    max-width: 600px;
    position: relative;
  }

  #searchInput {
    width: 100%;
    padding: 10px 15px;
    border-radius: 25px;
    border: 1px solid #ccc;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    outline: none;
    font-family: Pompadur;
  }

  .results-count {
    text-align: center;
    margin-top: 10px;
    font-family: Pompadur;
  }

  #searchResults {
    display: none;
  }

  .search-results-title {
    text-align: center;
    margin: 15px 0;
    font-size: 1.2em;
  }

  #clearSearch {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    font-size: 18px;
  }

.spinner {
  border: 3px solid rgba(43, 36, 43, 0.39);
  border-radius: 50%;
  border-top: 3px solid rgb(205,11,12);
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
