/* top-bar.css */

.top-bar {
    margin: 20px 0;
    padding: 10px 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.top-bar-columns {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: nowrap;
}

.top-bar-left {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.top-bar-categories,
.top-bar-subcategories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.top-bar-right {
    flex: 0 0 320px;
    max-width: 320px;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
}

.top-bar-search-form {
    display: flex;
    align-items: stretch;
    width: 100%;
    max-width: 320px;
    padding: 0;
    margin: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

.top-bar-search-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 48px;
    padding: 0 18px;
    border: 1px solid #ccc;
    border-right: none;
    border-radius: 16px 0 0 16px;
    outline: none;
    font-size: 16px;
    margin: 0;
}

.top-bar-search-button {
    flex: 0 0 52px;
    width: 52px;
    height: 48px;
    padding: 0;
    border: none;
    border-radius: 0 16px 16px 0;
    background: #3949ab;
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: background 0.3s ease;
}

.top-bar-search-button:hover {
    background: #5c6bc0;
}

.top-bar-category {
    padding: 8px 14px;
    border-radius: 20px;
    background: #3949ab;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

.top-bar-category:hover {
    background: #5c6bc0;
    text-decoration: none;
}

.top-bar-subcategory {
    padding: 6px 12px;
    border-radius: 18px;
    background: #c5cae9;
    color: #1a237e;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}

.top-bar-subcategory:hover {
    background: #9fa8da;
    text-decoration: none;
}

@media (max-width: 768px) {
    .top-bar {
        padding: 10px;
    }

    .top-bar-columns {
        flex-direction: column;
        align-items: stretch;
    }

    .top-bar-right {
        flex: 1 1 auto;
        max-width: 100%;
        justify-content: center;
        margin-top: 15px;
    }

    .top-bar-search-form {
        max-width: 100%;
    }

    .top-bar-search-input {
        height: 44px;
        font-size: 15px;
    }

    .top-bar-search-button {
        flex-basis: 56px;
        width: 56px;
        height: 44px;
    }

    .top-bar-categories,
    .top-bar-subcategories {
        justify-content: center;
    }
}