.search-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    text-align: center;
}

.search-input {
    width: 70%;
    max-width: 600px;
    padding: 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid rgba(209, 213, 219, 0.6);
    font-size: 1rem;
    outline: none;
    background: rgba(255, 255, 255, 0.8);
    color: #6b7280;
    transition: all 0.4s ease; /* плавная анимация */
    transform: scale(0.95); /* небольшой эффект "въезда" */
    opacity: 0;
    animation: fadeIn 0.7s ease forwards;
}

@keyframes fadeIn {
    0% { opacity: 0; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-input:focus {
    width: 100%;
    border-color: #3ba7c5;
    box-shadow: 0 0 8px rgba(37, 157, 168, 0.4);
    background: rgba(255, 255, 255, 0.95);
}

.dropdown {
    position: absolute;
    top: calc(100% + 0.5rem); /* Чуть ниже поля */
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    background: rgba(255, 255, 255, 1);
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.dropdown.active {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: #f0f9ff;
}

li.dropdown-item img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 0.25rem;
    margin-right: 0.75rem;
}

.dropdown-item a {
    color: #259da8;
    text-decoration: none;
    font-weight: 500;
    flex-grow: 1; /* текст растягивается */
}

.dropdown-item a:hover {
    color: #1d7a85;
    text-decoration: underline;
}

.no-results, .error-message {
    padding: 1rem;
    text-align: center;
    color: #4b5563;
    font-size: 0.9rem;
}

.error-message {
    color: #dc2626;
}

/* Блок с товарами */
.products-container {
    margin-top: 2.5rem; /* Чуть ниже поиска */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    justify-items: center;
}
