/* header-search.css - Стили для поиска в шапке */

.header-search {
    display: flex;
    align-items: center;
    margin-left: 30px;
    flex-grow: 1;
    max-width: 500px;
}

.search-form {
    display: flex;
    width: 100%;
    position: relative;
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 25px 0 0 25px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}

.search-input:focus {
    border-color: #4caf50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.search-button {
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 0 25px 25px 0;
    padding: 0 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-button:hover {
    background: #3d8b40;
}

.search-button i {
    font-size: 16px;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: all 0.2s;
}

.search-result-item:hover {
    background: #f9f9f9;
}

.search-result-image {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
}

.search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-info {
    flex: 1;
}

.search-result-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 3px;
}

.search-result-price {
    color: #e53935;
    font-weight: 600;
    font-size: 14px;
}

.search-result-empty {
    padding: 20px;
    text-align: center;
    color: #666;
}

@media (max-width: 1024px) {
    .header-search {
        margin-left: 20px;
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .header-search {
        order: 3;
        margin: 15px 0 0 0;
        max-width: 100%;
        width: 100%;
    }
    
    .header-content {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .header-content {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
    }
    
    /* Первая строка: бургер + лого + корзина */
    .header-burger {
        order: 1;
        margin-right: 10px;
    }
    
    .logo {
        order: 2;
        flex: 1;
        display: flex;
        align-items: center;
    }
    
    .mobile-cart {
        order: 3;
        margin-left: 10px;
    }
    
    /* Вторая строка: поиск */
    .header-search {
        order: 4;
        margin: 15px 0 0 0;
        width: 100%;
    }
    
    /* Третья строка: контакты */
    .contact-info {
        order: 5;
        width: 100%;
        margin-top: 15px;
        padding-top: 15px;
        display: flex !important;
        flex-direction: column;
        align-items: center;
        border-top: 1px solid rgba(255,255,255,0.2);
    }
    
    .contact-info div {
        margin-bottom: 8px;
    }
}